You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2013/04/02 12:37:16 UTC

[jira] [Commented] (OAK-732) Change TreeLocation.getChild() to only accept direct child nodes (not relative paths)

    [ https://issues.apache.org/jira/browse/OAK-732?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13619681#comment-13619681 ] 

Michael Dürig commented on OAK-732:
-----------------------------------

With the proposed patch the {{ReadPropertyTest}} performs roughly 40% better:

{code}
Apache Jackrabbit Oak
# ReadPropertyTest               min     10%     50%     90%     max       N
Oak-Default                       12      12      14      14      22    4403
Oak-Default (patched)              9      10      10      11      36    5756
{code}
                
> Change TreeLocation.getChild() to only accept direct child nodes (not relative paths)
> -------------------------------------------------------------------------------------
>
>                 Key: OAK-732
>                 URL: https://issues.apache.org/jira/browse/OAK-732
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Michael Dürig
>         Attachments: OAK-732.patch
>
>
> As mentioned on the list [1] resolving relative paths in {{TreeLocation.getChild()}} is expensive. Since not all clients need this functionality but all inherit the additional performance penalty, I suggest to remove support for relative paths and move that functionality into a helper class (e.g. {{LocationHelper}}). 
> {code}
>      /**
> -     * Navigate to a child through a relative path. A relative path consists of a
> -     * possibly empty lists of names separated by forward slashes.
> -     * @param relPath  relative path to the child
> +     * Navigate to a child of the given {@code name}.
> +     * @param name  name of the child
>       * @return  a {@code TreeLocation} for a child with the given {@code name}.
>       */
>      @Nonnull
> -    TreeLocation getChild(String relPath);
> +    TreeLocation getChild(String name);
> {code}
> [1] http://markmail.org/message/o72qikdvyr5xyxfu

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira