[cvsnt] Re: CVS lock server

Tony Hoyle tmh at nodomain.org
Sat Mar 5 15:27:01 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


alexey-panchenko at hotmail.ru wrote:
> map<Lock*, map<site_t,Lock*>, LockPtrLessOperator>

That's just overcomplex.  Just use:

map<Lock*,int>

Since the main lock list holds the correct mapping & that array is only 
used in the one fuction.

Also there's no point in uppercasing as the lockserver is case sensitive 
on all platforms.  Just replace the loop with a strcmp which is an 
intrinsic function and compiles to very efficient code.

> Without string copying. Compare operations have almost the same cost
> as in the current implementation. This solution is more scalable for
> large number of concurrent users.
> 
For large numbers of concurrent users the lockserver isn't the criticial 
part - the memory, IO and cpu overhead of all the cvs.exe processes is 
far greater.

Tony



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook