[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: SteveKing <steveking_at_gmx.ch>
Date: 2004-10-29 17:32:43 CEST

Will Dean wrote:

> 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.

Ok, I've removed the const cast and put the _tcslen() before the
for-loop. So it's now O(n).
But I don't know exactly what you mean by doing the conversion before
caching the path names. Where exactly would you do that?

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 Fri Oct 29 18:39:19 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.