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

angela commented on JCR-1239:
-----------------------------

> Thinking of it, that proposal has the drawback of being hard to optimize for 
> when the client 
> gets the size *and* starts iterating though the children. 

why? i don't see the problem.
you have the size for free in the case somebody only wants to display the size 
and
you can delay the retrieval of the child information to the point, where the 
user really
starts iterating. since we cannot determine the size with absolute correctness 
anyway 
(see #1166 for details) the size would then be adjusted if it turns out to be 
wrong.

> Thus I'd still favor using either a RangeIterator or a Collection. 

i'm still in favor of marcels proposal or keep it as is.

> SPI: Provide possibility to retrieve the number of child-nodes without 
> retrieving them.
> ---------------------------------------------------------------------------------------
>
>                 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.

Reply via email to