Will Dean wrote:
> I think a major perf hotspot for large directory trees is the code in
> CSVNStatusListCtrl::Stat which checks if there are 'unversioned' files
> which differ only in case in from ones which are already in the repository.
This is to make sure that there are no case-renamed files around which
could end up in two files differing only in case in the repository. You
all know what that means on a windows OS...
> As implemented, this checks every unversioned filename against every
> other filename in the whole tree to see if it (case-insensitive) matches.
> There is a mechanism in the code to prevent this test being run for the
> contents of 'unversioned' folders, but I suspect that this mechanism is
> currently broken.
Yep! See line 329 and 443 in SVNStatusListCtrl.cpp :(
The comments are correct, but inunversionedfolder is set to FALSE anyway.
Fixed in revision 2125.
> Another problem is the way in which the string compare is being done.
> This uses the CString 'CompareNoCase' function to compare two CStrings.
> Because the CompareNoCase function actually takes a TCHAR*, the actual
> compare ends up being done by a 'c' style stricmp function, which does a
> char-by-char compare.
> There are two issues here - one is that before we started the compare,
> we knew the lengths of both the string objects (because CString has an
> embedded length) - as we're only interested in whether the items match,
> and not their lexical order, we should compare the lengths before going
> to the string comparison.
Ok, added a length check before the comparison in revision 2125.
> The other issue is that the type of data
> we're comparing is *appallingly slow* to compare with a stricmp-style
> function which starts at the left and works across - if we must do lots
> of stricmp-type operations, we should probably write a compare which
> works from the right. (Which you can do efficiently with two CStrings,
> because you already know the length before you start.)
> If Stefan's happy, I might submit a patch on some of this later this
Can you write the reverse comparison? Or is it enough with the fixes I
Oh, and thanks for the profiling. Next job for you: profilig a large
checkout (SVNProgressDlg) ;)
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest Interface to (Sub)Version Control
/_/ \_\ http://tortoisesvn.tigris.org
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Wed Dec 15 18:34:13 2004