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 12:19:33 GMT

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

Thomas Mueller commented on OAK-201:

A stack trace:

SessionImpl.refresh(boolean) line: 156	
WorkspaceImpl$1.refresh() line: 153	
WorkspaceImpl$1(NamespaceRegistryImpl).getURI(String) line: 162	
SessionImpl(AbstractSession).getNamespaceURI(String) line: 132	
SessionDelegate$SessionNameMapper.getOakPrefix(String) line: 453	
SessionDelegate$SessionNameMapper(AbstractNameMapper).getOakName(String) line: 61	
NamePathMapperImpl.getOakName(String) line: 46	
NodeTypeManagerImpl.getNodeType(String) line: 83	
NodeImpl.addNode(String, String) line: 217	

So for each addNode(String, String), currently there is a Session.refresh(true).
> 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