[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] More on Commit dialog performance

From: SteveKing <steveking_at_gmx.ch>
Date: 2004-12-15 18:31:12 CET

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.)
[snip]
> If Stefan's happy, I might submit a patch on some of this later this
> evening.

Can you write the reverse comparison? Or is it enough with the fixes I
committed already?

Oh, and thanks for the profiling. Next job for you: profilig a large
checkout (SVNProgressDlg) ;)

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Dec 15 18:34:13 2004

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.