jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Mueller (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-201) NamespaceRegistry is very slow
Date Mon, 23 Jul 2012 11:41:37 GMT

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

Thomas Mueller commented on OAK-201:

Yes, that makes sense. 

It seems sometimes a one-way conversion is needed currently, for example in NodeImpl.setPrimaryType:

    String jcrPrimaryType = sessionDelegate.getOakPathOrThrow(Property.JCR_PRIMARY_TYPE);

Property.JCR_PRIMARY_TYPE is the expanded form ("{http://...}primaryType").

I guess we could create constants with the short form ("nt:primaryType"), and then check if
there are remappings. Or use a hardcoded list for known remappings (either just the prefixes
or the complete names).

> 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
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message