I was testing a repository where a particular node has 10000 child nodes.
If I get an iterator over these child nodes, and on this iterator, if I call
a skip, the performance is very slow (almost 3 seconds for 9000 nodes).  On
the other hand, if I were to run an XPATH query that returns the exact same
10000 nodes, and if I call on skip on this iterator, the skip is almost
instantaneous.

When I looked deeper, I noticed the iterator in the first case is a
LazyItemIterator, while in the second case, it is a
QueryResultImpl$LazyScoreNodeIterator.  Is that the only reason for the
difference in performance?

Thanks,
Sridhar

Reply via email to