Tobias Bocanegra created OAK-1172: ------------------------------------- Summary: AbstractTree.getChildrenCount() not very performant due to INTERNAL_NODE_NAMES Key: OAK-1172 URL: https://issues.apache.org/jira/browse/OAK-1172 Project: Jackrabbit Oak Issue Type: Bug Reporter: Tobias Bocanegra
the AbstractTree.getChildrenCount() does unnecessary checks for hidden names: {code} long count = nodeBuilder.getChildNodeCount(max); for (String name : INTERNAL_NODE_NAMES) { if (nodeBuilder.hasChildNode(name)) { count--; } } {code} this is not optimal, especially because the nodebuilder creates child builders: {code} public boolean hasChildNode(@Nonnull String name) { return getChildNode(name).exists(); } {code} Suggest: to extend the NodeBuilder.getChildNodeCount() method to accept an additional flag if to include hidden nodes or not. -- This message was sent by Atlassian JIRA (v6.1#6144)