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

Re: [PATCH] Re: 1.1rc1 performance regression in 'svn status' (and also 1.1rc2)

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2004-08-17 21:58:46 CEST

Hi,

Here is another idea for solving this caching problem.

WARNING, WARNING, WARNING: I am starting to feel insane solving this one.
It's a bad regressions, but we have to stop somewhere.

- Have a global hash with mappings from handle name (identifying the
translation) to a linked list of xlate handles.
- When you want to translate:
. Lock a mutex.
. Look for a handle in the hash. If one is found, remove it from the list
and use it.
. If no handle was found, create one.
. Unlock the mutex
. Use the handle.
. Lock, put the handle back into the list and unlock.

This avoids having the lock held during the translation. It will create as
many handles as is needed simultaneously and destroy them at program
termination.

It would be simpler to just have one handle per combination of to/from
encoding, but as Greg pointed out, this might give to much contention on
the translation lock, especially since we do a lot of translations during
our WC crawling commands.

Comments/flames/... Maybe we just hve to give up on this one?

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 17 22:18:42 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.