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 Schreiber (Jira)" <ji...@apache.org> on 2022/03/29 07:25:00 UTC
[jira] [Resolved] (OAK-9737) Avoid duplicate tree resolution by using ResultRow.getTree
[ https://issues.apache.org/jira/browse/OAK-9737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Angela Schreiber resolved OAK-9737.
-----------------------------------
Resolution: Fixed
potential improvements for usages of IdentifierManager.getReferences (e.g. in group membereship resolution will be covered in a separate ticket)
> Avoid duplicate tree resolution by using ResultRow.getTree
> ----------------------------------------------------------
>
> Key: OAK-9737
> URL: https://issues.apache.org/jira/browse/OAK-9737
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: core, security
> Reporter: Angela Schreiber
> Assignee: Angela Schreiber
> Priority: Major
> Labels: performance
> Fix For: 1.44.0
>
>
> hi [~thomasm] as discussed in private i noticed that throughout the oak code base we execute internal queries with the following pattern:
> - execute oak query
> - retrieve resultrows
> - calll {{ResultRow.getPath}} or {{ResultRow.getValue(JCR_PATH)}}
> - retrieve the tree associated with the given path
> while debugging a problem with [~kpauls] i noticed yesterday that the implementation of {{ResultRow.getPath}} actually retrieves the path from a tree, which to my knowledge was created with the {{Root}} object that executed the query.
> In other words: we retrieve the {{Tree}} objects twice with the same {{ContentSession}} for the same {{Root}} object instead of making use of {{ResultRow.getTree}}.
> So far I spotted the following locations where this should be improved:
> - IdentifierManager.getTree(String)
> - UserQueryManager and ResultRowToAuthorizable
> - AccessControlManagerImpl.createPrincipalACL
> - AccessControlManagerImpl.getEffectivePolicies
> - UserProvider.getAuthorizableByPrincipal
> There might also be room for improvement when it comes to
> - IdentifierManager.getReferences (returns iterable of path)
> cc: [~jhoh] for your interest
--
This message was sent by Atlassian Jira
(v8.20.1#820001)