Marcel Reutegger created OAK-1149:
-------------------------------------

             Summary: Avoid exists check in NodeDelegate.getChild() with empty 
path
                 Key: OAK-1149
                 URL: https://issues.apache.org/jira/browse/OAK-1149
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: jcr
            Reporter: Marcel Reutegger
            Assignee: Marcel Reutegger
            Priority: Minor


This is a minor optmization when {{relPath}} in {{NodeDelegate.getChild()}} is 
the empty path. In this case there is no need to get the tree, check existence 
and wrap it with a NodeDelegate. The method can just return {{this}}.

Most of the time {{relPath}} is not empty, but it can still happen quite 
frequently because {{Node.addNode()}} is usually called with a name only.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to