GNOME Bugzilla – Bug 638607
SVN listing is way too slow for huge working copies
Last modified: 2011-01-07 21:12:57 UTC
When using meld in VC mode on huge working copies, in flat view, it takes forever to populate the list. Internally, a separate 'svn status -Nv --xml' command is executed for every directory. The patch that is going to be attached to this entry eliminates the performance bottleneck by issuing a single 'svn status -v --xml' command and caching the tree structure, just like the bzr VC interface. The tree structure is a directory of directories, so list population is fast even for huge working trees.
Also, in contrast, to the bzr VC interface, file names remain in sorted order.
This patch applies cleanly to the trunk as of today. Last commit: commit 4a3fb2a885abe527c3fab30d716de9002c41dc88 Author: Kai Willadsen <kai.willadsen@gmail.com> Date: Fri Oct 22 05:12:15 2010 +1000
Created attachment 177432 [details] [review] patch for the issue see messages above
Review of attachment 177432 [details] [review]: Generally, this looks pretty good. There's a few cleanups that could be made, and your patch contains quite a lot of trailing whitespace. Other comments inline. Also, how does this patch affect running Meld on only a subdirectory of an SVN repository? ::: meld/vc/svn.py @@ +115,3 @@ + + if not directory in tree: + return retdirs, retfiles This would look cleaner if you returned [], [] and then moved the initialisation of retfiles and retdirs down to before the loop. @@ +121,3 @@ + names_in_dirtree.sort() + + for name in names_in_dirtree: Any reason to not just make this, for name in sorted(dirtree.keys()): @@ +122,3 @@ + + for name in names_in_dirtree: + state_and_rev = dirtree[name] state, rev = dirtree[name] and change the subsequent code?
A subdirectory of a SVN working copy is a SVN working copy (checked out from a different URL). I have observed no differences. Thank you for your review. I have attached an updated version of the patch.
Created attachment 177618 [details] [review] updated patch
Cool. I made a couple of very minor changes and I've just pushed the result to head. Thanks for the patch.