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

[TSVN] PreserveChdir improvement

From: Will Dean <svn_at_indcomp.co.uk>
Date: 2004-10-31 21:44:10 CET

Hi,

Further to my other notes about performance, the appended version of the
PreserveChdir class destructor reduces my (highly artificial) test run time
from around 500ms to around 350, which seems worthwhile.

Cheers,

Will

PreserveChdir::~PreserveChdir()
{
   TCHAR currentDirectory[MAX_PATH + 1];

   // _tchdir is an expensive function - don't call it unless we really have to
   tgetcwd(currentDirectory, MAX_PATH);
   if(_tcscmp(currentDirectory, originalCurrentDirectory) != 0)
   {
      _tchdir(originalCurrentDirectory);
   }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sun Oct 31 21:53:37 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.