Joerg Hoh created OAK-12498:
-------------------------------

             Summary: Avoid redundant property lookups during iteration
                 Key: OAK-12498
                 URL: https://issues.apache.org/jira/browse/OAK-12498
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: jcr
            Reporter: Joerg Hoh


When iterating properties, NodeDelegate.getProperties() already receives each 
PropertyState. However, it passes only the property name to the 
PropertyDelegate constructor, which retrieves the state again through 
parent.getProperty(name).

This adds an unnecessary lookup, including tree-read and access-control 
bookkeeping, for every consumed property.

Reuse the enumerated PropertyState when constructing the delegate. If the 
session has changed since iterator creation, retrieve current state instead to 
preserve update behavior.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to