[ https://issues.apache.org/jira/browse/OAK-8234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816297#comment-16816297 ]
Alex Deparvu commented on OAK-8234: ----------------------------------- Proposed patch [0]. In order to keep the change footprint to a minimum, I decided to turn the {{PermissionProviderImpl}} into a wrapper that would delegate calls to the admin allow-all version, or the existing version (copy of the current code, renamed as {{CompiledPermissionProviderImpl}}). As an interesting aside there's a failing test I had to mark ignore, which deserves some discussion: {{PermissionProviderImplTest#testIsGrantedNonExistingVersionStoreLocation}}. Does it really matter for an admin session if that path actually exists or not? [~anchela] what do you think? Also, the benchmark numbers are crazy (20x improvement on ConcurrentHasPermissionTest): {noformat} [trunk] # ConcurrentHasPermissionTes C min 10% 50% 90% max N Import deep tree: 7359 All paths: 123545 Oak-Segment-Tar 10 5 10 64 189 742 6992 [patch] # ConcurrentHasPermissionTes C min 10% 50% 90% max N Import deep tree: 6179 All paths: 123545 Oak-Segment-Tar 10 0 7 8 9 56 75327 {noformat} [0] https://github.com/apache/jackrabbit-oak/compare/trunk...stillalex:OAK-8234 > Reduce object allocation in PermissionProviderImpl for admin sessions > --------------------------------------------------------------------- > > Key: OAK-8234 > URL: https://issues.apache.org/jira/browse/OAK-8234 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core, security > Reporter: Alex Deparvu > Assignee: Alex Deparvu > Priority: Major > > There was already a lot of work done here to improve efficiency of admin > sessions, but we can still do better by simply not creating many of the > objects needed as parameters for the {{CompiledPermissions}} which will be > ignored anyway in the case of admin sessions. > Ex: There are a lot of immutable trees (created via > {{PermissionUtil.getReadOnlyTree(tree, immutableRoot)}}) that are not used > for the evaluation. > Thanks to [~mreutegg] for spotting this one! -- This message was sent by Atlassian JIRA (v7.6.3#76005)