directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <seelm...@apache.org>
Subject Re: DN and valueOf( "<a DN>" ) method
Date Wed, 28 Jul 2010 09:31:47 GMT
> I was thinking lately about the DN class. I know that OpenDS (and probably
> UnboundId, but not sure) has a DN.valueOf( "<a DN>" ) factory that returns a
> DN potentially leveraging a cache associated to a ThreadLocal.
>
...
>
> I don't think it's such a good idea :
> - first, as it's ThreadLocal based, you will have as many cache as you have
> threads processing requests. Not sure it competes with a unique cache, not
> sure either we can't use the memory in a better way...

An advantage to use ThreadLocal is that you don't need to synchronize
access to the cache Could be worth to measure the performance
difference, I wonder if the OpenDS team did some performance analysis?

Mime
View raw message