Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 399500

Summary: Compare: After using formatJS in a large file, the compare widget somehow gets slow.
Product: [ECD] Orion Reporter: libing wang <libingw>
Component: ClientAssignee: libing wang <libingw>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 1.0Flags: mamacdon: review+
Target Milestone: 2.0 RC2   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description libing wang CLA 2013-01-30 10:05:46 EST
Noticed this when I used formatJS plugin to format a large file.
The in git status page the compare widget gets slow.
I think it is because the merging of dummy file and the annotation is huge.
Will investigate later...
Comment 1 libing wang CLA 2013-01-30 10:30:15 EST
In the following commit, the change is huge.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8f83461bf744e07bde588ec3a10e39285546e0b8.

If you open the orion commit page and expand searchExplorer.js, the inline compare almost got unresponsive.

I did a investigation before I commit this commit.
1.Copy the searchExplorer.js
2.Checkout the searchExplorer.js
3.Select the copy and searchExplorer.js
4. Use comapre two files action

It worked on the two way compare.
I bet there are something wrong on the inline compare in this case, as the both the dummy file size and annotation doubled the two way compare.
Comment 2 libing wang CLA 2013-02-08 11:56:42 EST
I saw the diff from git is kind of strange.
As it is really a rare case and the reason is complex, somehow the jsDiff is spending a lot of time for the WORD DIFF.
Will investigate in 3.0M1 time frame.
Comment 3 libing wang CLA 2013-02-11 11:39:27 EST
We should not calculate word diff if either side of the diff block is huge. The word diff in this case is time consuming and meaningless.
Comment 5 Mark Macdonald CLA 2013-02-11 15:29:43 EST
looks good
Comment 6 libing wang CLA 2013-02-11 15:53:42 EST
Merged back to master.