[cvsnt] Re: CVS lock server
Tony Hoyle
tmh at nodomain.org
Sat Mar 5 15:27:01 GMT 2005
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