[
http://issues.apache.org/jira/browse/JCR-688?page=comments#action_12460272 ]
Marcel Reutegger commented on JCR-688:
--------------------------------------
One example is regularly accessing properties with the same name. In an
application you will usually have a fixed set of property names (unless you use
residual properties).
The following test case executes 5 times faster with name caching:
public void testPropertyAccess() throws RepositoryException {
for (int i = 0; i < 100; i++) {
testRootNode.addNode("node" + i);
}
testRootNode.save();
long time = System.currentTimeMillis();
// loop 1000 times over child nodes and access two properties
for (int i = 0; i < 1000; i++) {
for (NodeIterator it = testRootNode.getNodes(); it.hasNext(); ) {
Node n = it.nextNode();
n.getProperty(jcrPrimaryType);
n.hasProperty(jcrMixinTypes);
}
}
time = System.currentTimeMillis() - time;
System.out.println("test took: " + time + " ms.");
}
> Improve name resolution
> -----------------------
>
> Key: JCR-688
> URL: http://issues.apache.org/jira/browse/JCR-688
> Project: Jackrabbit
> Issue Type: Improvement
> Components: core
> Reporter: Jukka Zitting
> Priority: Minor
> Fix For: 1.3
>
>
> 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:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira