GNOME Bugzilla – Bug 168139
Wishlist: interactive editing of large files could be faster
Last modified: 2009-07-28 08:54:04 UTC
The interacive edit/update gets pretty slow on larger files. My worst one is an 800 line file which I merge with a 3000 line version produced by my code generator and this is almost unsuably slow on my 1.8GHz Athlon64. It takes about 4 seconds to: insert a char / paste some text / transfer a diff fragment. The files are attached below.
Created attachment 37771 [details] First file Original version of file (800 lines)
Created attachment 37772 [details] Second file Version produced by a code generator (2900 lines)
*** Bug 344604 has been marked as a duplicate of this bug. ***
*** Bug 357459 has been marked as a duplicate of this bug. ***
Does this relate to the GUI? If so, it looks like it paints too much to me. Limiting repaints / refreshes of the tree to once per second should do. My Celeron 2.8 GHz is 65% occupied while diffing.
Nope, the computation of diffs is the expensive part, since it is done almost from scratch for each change. Surprisingly, I couldn't find any relevant literature on incremental updates to diffs. I have a few ideas, but it's a fairly weighty piece of work.
*** Bug 473484 has been marked as a duplicate of this bug. ***
One possibility for improving interactive editing (without solving the incremental diff problem) is to throttle the diff updating process or, as suggested in Bug 514017, only start the process after a short period of inactivity. Would this be a reasonable compromise?
With recent changes (see commits 12f3ba4 and 40b26c5) interactive editing should be much faster, so I'm going to close this bug. I'm sure that there are still some corner cases that trigger slowdowns; please open new bugs if you come across any. Thanks for the bug report.
The main problem I had was editing via cut/paste. It appeared that each character being pasted caused a recaclulation of the diffs, because if I pasted a hundred line block in a several thousand line file meld would lock up for several minutes. This seems a lot better now, thanks!