jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] Commented: (JCR-1405) SPI: Introduce NodeInfo.getChildInfos()
Date Wed, 07 May 2008 18:11:00 GMT

    [ https://issues.apache.org/jira/browse/JCR-1405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594985#action_12594985

Michael Dürig commented on JCR-1405:

I tested Angela's initial patch and updated it to the latest revision.

The patch works well. In may case it helps to cut down the number of round-trips to the back-end
store significantly:

In my test case including the ChildInfos within NodeInfo results in 4 calls to RepositoryService.getItemInfos()
and in no calls to RepositoryService.getChildInfos() at all. Not including them results in
the same 4 calls to RepositoryService.getItemInfos() and additionally in 15 calls to RepositoryService.getChildInfos().

Since the patch does not change existing semantics (just return null for NodeInfo.getChildInfos)
but on the other hand has the potential to vastly increase performance in some common case
I'd very much like to see this patch applied.

> SPI: Introduce NodeInfo.getChildInfos()
> ---------------------------------------
>                 Key: JCR-1405
>                 URL: https://issues.apache.org/jira/browse/JCR-1405
>             Project: Jackrabbit
>          Issue Type: New Feature
>          Components: jackrabbit-spi
>            Reporter: angela
>         Attachments: JCR-1405.patch, JCR-1405b.patch
> Improvement suggested by Marcel:
> ChildInfo is basically a stripped down NodeInfo. With little effort it would even be
possible to have NodeInfo extends ChildInfo. Not sure how useful that is, but since we don't
have that inheritance in code and at the same time nearly a 100% overlap it makes me suspicious.
> Here's another idea:
> introduce a method ChildInfo[] NodeInfo.getChildInfos(). The method either returns:
> - all child infos, which also gives the correct number of child nodes. this may also
mean that an empty array is returned to indicate there are no child nodes.
> - null, to indicate that there are *lots* of child nodes and the method RepositoryService.getChildInfos()
with the iterator should be used. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message