You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2013/11/05 15:45:22 UTC
[jira] [Resolved] (OAK-1046) Faster anonymous read operations
[ https://issues.apache.org/jira/browse/OAK-1046?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela resolved OAK-1046.
-------------------------
Resolution: Duplicate
is part of OAK-908
> Faster anonymous read operations
> --------------------------------
>
> Key: OAK-1046
> URL: https://issues.apache.org/jira/browse/OAK-1046
> Project: Jackrabbit Oak
> Issue Type: Sub-task
> Reporter: Thomas Mueller
> Attachments: OAK-1046-test-1.patch
>
>
> The oak-run test GetNodeWithAnonymous is currently quite a bit slower than GetNodeWithAdmin. According to my profiling data, the main bottleneck is SecurityContext.getReadStatus, which calls PermissionProvider.getReadStatus which calls CompiledPermissionImpl.getReadStatus.
> To improve performance, I tried caching the result of this call, using a simple hash map, with a string key (tree.getPath() + property.getName()). This improved performance to now:
> {code}
> java -Dwarmup=5 -Druntime=30 -jar target/oak-run-*.jar benchmark GetNodeWithAnonymous Oak-Tar
> packages:
> 39%: org.apache.jackrabbit.oak.plugins.segment
> 23%: org.apache.jackrabbit.oak.core
> 14%: org.apache.jackrabbit.oak.plugins.memory
> 6%: org.apache.jackrabbit.oak.namepath
> 4%: com.google.common.collect
> 4%: org.apache.jackrabbit.oak.jcr.session
> 3%: org.apache.jackrabbit.oak.util
> .
> Oak-Tar 142 144 146 148 218 203
> java -Dwarmup=5 -Druntime=30 -jar target/oak-run-*.jar benchmark GetNodeWithAdmin Oak-Tar
> packages:
> 29%: org.apache.jackrabbit.oak.plugins.segment
> 17%: org.apache.jackrabbit.oak.plugins.memory
> 17%: org.apache.jackrabbit.oak.namepath
> 12%: org.apache.jackrabbit.oak.jcr.session
> 8%: org.apache.jackrabbit.oak.util
> 5%: org.apache.jackrabbit.oak.core
> 4%: org.apache.jackrabbit.oak.plugins.segment.file
> .
> Oak-Tar 35 35 36 37 73 818
> {code}
> So it is still about 4 times slower, but it's an improvement (currently it is 10 times slower).
> I wonder if there is a better way. I'm don't think caching the ReadStatus on a property or node level is very memory efficient, but maybe other solutions would be very hard to implement.
--
This message was sent by Atlassian JIRA
(v6.1#6144)