> 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?
