[
https://issues.apache.org/jira/browse/OAK-924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13790333#comment-13790333
]
Jukka Zitting commented on OAK-924:
-----------------------------------
bq. What about keeping (caching) the whole namespace data fully in memory
The underlying nodes should in most cases be already fully cached in memory, so
I'd rather avoid another level of caching (and the related extra complexity)
unless it really is needed. The key bottleneck here are the unoptimized data
structure and access patterns, not the raw lookup speed as such. For example
current the init() method in ReadOnlyNamespaceRegistry has O(n^2) performance.
For comparison, with the node type access we had a similar performance problem
caused by lots of unnecessary content accesses. By precompiling the frequently
accessed bits into a more efficient content structure I was able to pretty much
eliminate the type access overhead from most use cases.
> Optimize namespace lookups
> --------------------------
>
> Key: OAK-924
> URL: https://issues.apache.org/jira/browse/OAK-924
> Project: Jackrabbit Oak
> Issue Type: Sub-task
> Components: core, jcr
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Labels: performance
> Attachments: OAK-924-bench.patch
>
>
> The current namespace handling code does a lot of repetitive work, which
> shows up in hotspots like XML imports and Sling's namespace mapping code.
--
This message was sent by Atlassian JIRA
(v6.1#6144)