[ https://issues.apache.org/jira/browse/OAK-5025?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15687238#comment-15687238 ]
angela commented on OAK-5025: ----------------------------- After discussing this in more detail with [~acollign] and [~tmueller], I feel that it would be better (and less prone to regressions) to use the list index to build the ACE node name than a random number. The result would look quite similar to the current way of generating the names with the following difference: - only first ACE node name is "allow" or "deny" (avoid failing impl tests that rely on the existing pattern) - any subsequent entry gets the index from within the list append irrespective of whether the ace is allowing or not Will attach benchmark results for status quo, initial proposal with random number and the final solution as described. > Speed up ACE node name generation > --------------------------------- > > Key: OAK-5025 > URL: https://issues.apache.org/jira/browse/OAK-5025 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: core > Affects Versions: 1.5.12 > Reporter: Alex COLLIGNON > Assignee: angela > Priority: Minor > Labels: performance > Fix For: 1.6 > > Attachments: OAK-5025-ACE-name-generation-benchmarks.patch, > OAK-5025-ACE-random-nodename-generation.patch > > > Currently, > {{o.a.j.oak.security.authorization.accesscontrol.Util#generateAceName}} is > traversing all the existing ACE of a certain node in order to generate > continuous numbering (allow0, allow1, allow2). > While that certainly helps to produce human readable names, it represents > quite a performance bottleneck when the number of existing ACE starts to grow. > Since the naming is a pure implementation detail, my proposal is to keep the > continuous numbering for the first hundreds of nodes and then use a random > number to generate unique names in a faster fashion. -- This message was sent by Atlassian JIRA (v6.3.4#6332)