[ 
https://issues.apache.org/jira/browse/OAK-4119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15190842#comment-15190842
 ] 

angela edited comment on OAK-4119 at 3/11/16 12:00 PM:
-------------------------------------------------------

Patch for the improvements summarized above + new/adjusted test-cases.

*Note1*: this meant for review and for benchmarks to identify if it has a 
positive impact on performance and be able to measure the impact; the patch 
still has TODOs/FIXME comments which would need to be resolved before 
committing.
*Note2*: I sometimes get oak-upgrade tests failing but doubt that they are 
related to the changes made by the patch.

[~tripod], since you are the original author of the group member structure I 
would appreciate if you review the suggested modifications.




was (Author: anchela):
Patch for the improvements summarized above + new/adjusted test-cases. *Note1*: 
this meant for review and for benchmarks to identify if it has a positive 
impact on performance and be able to measure the impact; the patch still has 
TODOs/FIXME comments which would need to be resolved before committing.
*Note2*: I sometimes get oak-upgrade tests failing but doubt that they are 
related to the changes made by the test.

[~tripod], since you are the original author of the group member structure I 
would appreciate if you review the suggested modifications.



> Improvements Take 1
> -------------------
>
>                 Key: OAK-4119
>                 URL: https://issues.apache.org/jira/browse/OAK-4119
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: angela
>            Assignee: angela
>         Attachments: OAK-4119.patch, OAK-4119_tests.patch
>
>
> First bunch of potential improvements to be tested/verified using the 
> benchmarks:
> h4. General
> - dedicated index for {{rep:members}} property defined by nt 
> {{rep:MemberReferences}}  (=> mod in {{UserInitializer}})
> - adjust nt-handling in {{IdentifierManager.getReferences}} : if a single nt 
> name is specified in the {{nodeTypeNames}} param it is inserted in the query 
> statement instead of looking for {{nt:base}}
> - introduce {{hasAnyReferenceInPath}}, which allows to search for any 
> references being located in a give subtree of the repository (with TODOs)
> h4. Group.isMember
> - {{MembershipProvider}}: introduce shortcut if a Group doesn't have any 
> members
> -  {{MembershipProvider}}: keep old logic if the target Group has 
> (potentially) pending changes 
> -  {{MembershipProvider}}: for unmodified Groups use reverse membership 
> lookup of the target authorizable instead (TODO: needs further optimization 
> as 'hasMembership' doesn't need to search for the complete membership; 
> therefore limiting the number of queries to be executed could be minimized)
> - {{GroupImpl}}: add shortcut if member to be tested is a Group representing 
> the {{EveryonePrincipal}}
> h4. Group.isDeclaredMember
> - introduce shortcut if a Group doesn't have any members
> - keep old logic if target Group (potentially) has pending changes or if the 
> number of members is small (=> threshold with {{MembershipProvider}})
> - for unmodified Groups with plenty of members use 
> {{IdentifierManager.hasAnyReferenceInPath}}
> - Modifications: {{MembershipProvider}}
> h4. Group.addMember(Authorizable)
> - {{GroupImpl}}: drop extra test for circular membership, which is anyway 
> enforced by the {{UserValidator}} => needs adjustment of test-cases that 
> expect this to be detected immediately => intoducing save-call to verify if 
> cycles are properly detected latest during commit.
> - {{UserValidator}}: if {{isMember}} is improved by the changes above, the 
> check for circular membership would be faster as well
> h4. Group.addMembers(String...)
> - introduce new methods on {{MembershipProvider}} and {{{{MembershipWriter}} 
> that don't take a single contentID but rather a Map of contentID:memberID and 
> returns the set of memberIDs that could not be processed successfully. 
> - consequently finding the best {{rep:members property}} and avoiding 
> duplicate membership is performed only once for the batch of ids to be added
> - Note: once best-property reaches threshold new member-ref nodes will be 
> created
> h4. Group.removeMembers(String...)
> - introduce new methods on {{MembershipProvider}} and {{{{MembershipWriter}} 
> that don't take a single contentID but rather a Map of contentID:memberID and 
> returns the set of memberIDs that could not be processed successfully.  
> - consequently for a given batch of ids the declared member are traversed 
> only once



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to