jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: ChildNodeEntry
Date Wed, 12 Sep 2012 09:35:25 GMT

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).


Jukka Zitting

View raw message