You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2007/01/03 14:06:27 UTC

[jira] Commented: (JCR-688) Improve name resolution

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

Marcel Reutegger commented on JCR-688:
--------------------------------------

> * The performance requirements and expected data sets for the QName->String
> and String->QName conversions seem quite different. For example the above
> test case is almost entirely governed by the String->QName conversion speed.
> It would probably make sense to consider using separate mechanisms for the
> two types of conversions.

I agree with you. The cost for converting a QName into its resolved String is probably
not worth caching the result. We should probably remove the cache for this conversion.

> * Moving the name cache from the global namespace registry to the session
> level would probably make sense. That would avoid the synchronization
> requirements at the expense of extra memory use. An extra benefit would be
> that the name cache could also be used when session-local namespace
> remappings are in effect.

While it certainly helps to avoid the concurrency issue it introduces a cache per session
which is in most cases filled with mappings that are just duplicates from other sessions.

I think the current location of the cache is the better choice because it uses the occupied
memory more effectively (shared with other sessions), though at the price of increased
concurrency on the cache. But that's IMO just a technical detail of the cache implementation.

> 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