Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
Description
while discussing JCR-4759 with joerghoh, i had a look at oak-jcr and the implementation of javax.jcr.Node#hasNode(String relPath), which looks as follows:
@Override public boolean hasNode(String relPath) throws RepositoryException { try { final String oakPath = getOakPathOrThrow(relPath); return perform(new NodeOperation<Boolean>(dlg, "hasNode") { @NotNull @Override public Boolean perform() throws RepositoryException { return node.getChild(oakPath) != null; } }); } catch (PathNotFoundException e) { return false; } }
this means that the underlaying child tree is always retrieved by calling Tree.getChild even for those cases where calling Tree.hasChild would be possible. I don't recall why exactly Tree.hasChild is never used here but it might we worth taking a look if this would be a performance improvement.
Attachments
Issue Links
- relates to
-
OAK-9667 Check the existence of child nodes matching a pattern
- Open