After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 638607 - SVN listing is way too slow for huge working copies
SVN listing is way too slow for huge working copies
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: version
1.5.x
Other All
: Normal enhancement
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-03 20:29 UTC by mail
Modified: 2011-01-07 21:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for the issue (3.30 KB, patch)
2011-01-03 20:48 UTC, mail
needs-work Details | Review
updated patch (6.98 KB, patch)
2011-01-05 22:14 UTC, mail
none Details | Review

Description mail 2011-01-03 20:29:46 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.
Comment 1 mail 2011-01-03 20:38:43 UTC
Also, in contrast, to the bzr VC interface, file names remain in sorted order.
Comment 2 mail 2011-01-03 20:41:23 UTC
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
Comment 3 mail 2011-01-03 20:48:07 UTC
Created attachment 177432 [details] [review]
patch for the issue

see messages above
Comment 4 Kai Willadsen 2011-01-04 20:33:35 UTC
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?
Comment 5 mail 2011-01-05 22:14:02 UTC
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.
Comment 6 mail 2011-01-05 22:14:44 UTC
Created attachment 177618 [details] [review]
updated patch
Comment 7 Kai Willadsen 2011-01-07 21:12:57 UTC
Cool. I made a couple of very minor changes and I've just pushed the result to head. Thanks for the patch.