[cvsnt] Re: CVS lock server

alexey-panchenko at hotmail.ru alexey-panchenko at hotmail.ru
Sat Mar 5 08:04:08 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.


>> 2. Use map instead of list in the lock server.
TH> It uses maps already.

I'll try to explain what I mean in details.

Currently "map<size_t,Lock>" keyed by lockId is used.

In the request_lock() function the whole map is scanned, very much
like a list. With large number of concurrent locks scan time will
increase linearly.

I suggest add additional "map<string, map<site_t,Lock*> >" keyed by
uppercased path. "map<site_t,Lock*>" will contain pointers to Lock
structures having the same uppercased path keyed by lockId. So,
instead of the whole map scan we will scan only the locks having the
same uppercased path, resulting in scan time O(log N).

The disadvantage is that with suggested implementation we would not
notice leaking locks for some more time. ;-)

-- 
Best regards,
 alexey-panchenko                            mailto:alexey-panchenko at hotmail.ru




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