jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <mreut...@adobe.com>
Subject RE: ChildNodeEntry
Date Wed, 12 Sep 2012 09:43:38 GMT
I see, that makes sense. Thanks for the clarification. I'll
add that to the JavaDoc.

I guess this is due to NodeState not knowing its name, but
on the other hand separating the name from the child
NodeState allows for enumerating the names only without
the need to actually load the states...

regards
 marcel

> -----Original Message-----
> From: Jukka Zitting [mailto:jukka.zitting@gmail.com]
> Sent: Mittwoch, 12. September 2012 11:35
> To: oak-dev@jackrabbit.apache.org
> Subject: Re: ChildNodeEntry
> 
> Hi,
> 
> On Wed, Sep 12, 2012 at 11:29 AM, Marcel Reutegger
> <mreutegg@adobe.com> wrote:
> > I was wondering why we have the interface ChildNodeEntry?
> 
> It allows you to avoid extra name lookups when traversing over all
> children of a node.
> 
> For example, if on a large node the cost of iterating over all child
> nodes is O(n) and that of looking up a specific child is O(log n),
> then with the cost difference between the alternatives you outlined is
> O(n) versus O(n log n).
> 
> BR,
> 
> Jukka Zitting

Mime
View raw message