jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-201) NamespaceRegistry is very slow
Date Tue, 18 Sep 2012 10:59:08 GMT

    [ https://issues.apache.org/jira/browse/OAK-201?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457738#comment-13457738

Marcel Reutegger commented on OAK-201:

The namespaces map in SessionImpl is not only used for session local namespace prefix re-mappings
but also for caching. The code is copied from JCR Commons AbstractSession and probably implements
the copy-on read as described in the JCR spec: http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.5.2%20Session-Local%20Mappings

Using the namespaces map also for the latter is problematic because hasSessionLocalMappings()
depends on this map. The method currently also returns true when there are in fact no session
local remappings. I think with the recent changes of OAK-306, the namespaces map can now be
used exclusively for remapped namespaces. Copy-on read is not necessary any more, because
the namespace registry now reads from the same stable tree as the session.
> NamespaceRegistry is very slow
> ------------------------------
>                 Key: OAK-201
>                 URL: https://issues.apache.org/jira/browse/OAK-201
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>            Reporter: Thomas Mueller
>         Attachments: OAK-201.patch
> The NamespaceRegistryImpl.getURI and getPrefix are called a lot, for example by NamePathMapperImpl.getOakName.

> The method doesn't do any caching, which is a problem because it has to read it each
time from the repository. Even if it would do caching, it wouldn't help because it the method
WorkspaceImpl.getNamespaceRegistry creates a new NamespaceRegistryImpl each time it is called.
To allow caching of known mappings, the instance needs to be cached as well.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

View raw message