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 "Vikas Saurabh (JIRA)" <ji...@apache.org> on 2015/01/29 13:50:34 UTC

[jira] [Comment Edited] (OAK-2464) Optimize read of known non-existing children

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

Vikas Saurabh edited comment on OAK-2464 at 1/29/15 12:49 PM:
--------------------------------------------------------------

Attached patch. The patch changes {{DocumentNodeStore::getNode}}'s ValueLoader when it tries to pick value from {{nodeCache}}. The ValueLoader now checks for docChildrenCache entry for parent of currently queried node. If it finds one which doesn't say {{hasMore}}, it iterates over the cached children to see if it can find matching node name. If not, we don't need to go down to DocumentStore.

[~chetanm] raised a concern that for looking up for in list of cached children, we are currently iterating over ArrayList of children. We can probably optimize that by having the list sorted or use Set for keeping the children.

[~mreutegg], [~chetanm], can you please review the change and the test case.


was (Author: catholicon):
Attached patch. The patch, {{DocumentNodeStore::getNode}}'s ValueLoader when it tries to pick value from {{nodeCache}}. The ValueLoader now checks for docChildrenCache entry for parent of currently queried node. If it finds one which doesn't say {{hasMore}}, it iterates over the cached children to see if it can find matching node name. If not, we don't need to go down to DocumentStore.

[~chetanm] raised a concern that for looking up for in list of cached children, we are currently iterating over ArrayList of children. We can probably optimize that by having the list sorted or use Set for keeping the children.

[~mreutegg], [~chetanm], can you please review the change and the test case.

> Optimize read of known non-existing children
> --------------------------------------------
>
>                 Key: OAK-2464
>                 URL: https://issues.apache.org/jira/browse/OAK-2464
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>            Reporter: Vikas Saurabh
>            Priority: Minor
>         Attachments: 0001-OAK-2464-Optimize-read-of-known-non-existing-childre.patch
>
>
> Reading a non-existing node always queries down to {{DocumentStore}}. {{DocumentNodeStore}} should consider {{nodeChildrenCache}} to see if it already knows about non-existence and avoid a look up into {{DocumentStore}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)