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

Re: [TSVN] Another go at a patch for SVNFolderStatus

From: Will Dean <svn_at_indcomp.co.uk>
Date: 2004-10-28 22:50:53 CEST

At 20:02 28/10/2004 +0200, you wrote:

>To be honest, I don't like that.

Fair enough - it's your baby, after all :-).

Can you elaborate on why? My only concern was the directory change, but
you've allayed my fears there. Other than that, it's just a matter of
making sure that fillstatusmap makes the path the same as it would have
been before. Nothing else needs to change, does it?

Anyway, if we can run with the proper SVN fixes, that's even better, of course.

Now, *completely* separately, but in the same area of code:

I do think it would give slightly better performance to do the / to \
conversion before caching path-names rather than at the top of
GetFullStatus. That would also allow us to get rid of

         TCHAR * filepathnonconst = (LPTSTR)filepath;
         //first change the filename to 'internal' format
         for (UINT i=0; i < _tcsclen(filepath); i++)
         {
                 if (filepath[i] == _T('\\'))
                         filepathnonconst[i] = _T('/');
         } // for (int i=0; i<_tcsclen(filename); i++)

which contains a deeply upsetting (to me) const-removing cast and a 'for'
loop which runs in O(n-squared) rather than O(n) time.

I'd like to be completely ruthless about optimising the cache-hit path
through GetFullStatus, because it's hit quite hard when browsing in big
folders.

What do you reckon?

Cheers,

Will

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Oct 28 23:53:25 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.