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

Jukka Zitting commented on JCR-688:
-----------------------------------

Attached JCR-688.NameResolver.v2.patch with reduced synchronization and a 
slightly improved increaseGenerationAge() method.

A quick ad-hoc test with the above testPropertyAccess method running in 20 
concurrent threads is about 6% faster using this implementation than with the 
current CachingNamespaceResolver. A few more percents can probably be achieved 
by getting rid of the current NameFormat indirections obsoleted by the new 
NameResolver interface.

Careful analysis of the performance tradeoffs could improve the cache even 
more. For example it might make sense to make the "young" generation write-only 
(i.e. only add mappings to it within the synchronized increaseGenerationAge()) 
to avoid extra monitor contention.


> 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
>         Assigned To: Jukka Zitting
>            Priority: Minor
>             Fix For: 1.3
>
>         Attachments: JCR-688.LocalCache.patch, JCR-688.NameResolver.patch, 
> JCR-688.NameResolver.v2.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