[ 
https://issues.apache.org/jira/browse/JCR-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462183
 ] 

Tobias Bocanegra commented on JCR-688:
--------------------------------------

i think using a simple ConcurrentReaderHashMap improves the performance quite a 
lot since NO synchronization needs to be done (if the element is found). And 
instead of maintaining a LRU mechanism, i would just clear the map if it 
reaches a certain size (e.g. 10'000 names). i think an application either uses 
few similar names or many different. and in the later case, an LRU map does not 
help either. the costs of rebuilding the cache after it was cleared are not 
higher than if the elements get shifted out of the LRU it this one is too small.

> Improve name resolution
> -----------------------
>
>                 Key: JCR-688
>                 URL: https://issues.apache.org/jira/browse/JCR-688
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: JCR-688.LocalCache.patch
>
>
> As discussed in JCR-685, the current CachingNamespaceResolver class contains 
> excessive synchronization causing monitor contention that reduces performance.
> In JCR-685 there's a proposed patch that replaces synchronization with a 
> read-write lock that would allow concurrent read access to the name cache.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to