jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1239) SPI: Return value of RepositoryService.getChildInfos
Date Wed, 28 Nov 2007 10:35:43 GMT

    [ https://issues.apache.org/jira/browse/JCR-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546197
] 

Marcel Reutegger commented on JCR-1239:
---------------------------------------

I think we should keep the SPI interface as simple as possible and not assume too much about
the ability of an implementation. The size of the child node entries collection might be expensive
to calculate for an implementation.

Even with the current Iterator the size can be easily counted in jcr2spi for a reasonable
amount of child nodes (i.e. 1000). This is the most common use case and will provide a correct
RangeIterator.getSize(). For really large collections (e.g. > 10'000) of child nodes I
suggest the getSize() in jcr2spi should return -1. Even though not currently implemented,
the jcr2spi layer should not cache these anyway because of memory consumption.

Therefore I propose to close this as won't fix.

> SPI: Return value of RepositoryService.getChildInfos
> ----------------------------------------------------
>
>                 Key: JCR-1239
>                 URL: https://issues.apache.org/jira/browse/JCR-1239
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-spi
>            Reporter: angela
>             Fix For: 1.4
>
>
> separate issue started by julian within issue #1166:
> RepositoryService.getChildInfos is defined to return an Iterator.
> this forces the caller to loop over all entries in order to detect the number of child-nodes.
> currently the hierarchy is populated any way, but that could be a source for future optimization.
> possible solutions:
> - change return value to RangeIterator
> - change return value to Collection (or Set).

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


Mime
View raw message