An instanceof test on the childInfo object to see if it's already a
nodeInfo could
avoid the call to getNodeInfo (and all name resolver operations, path
parsing and so on).
Johann,
While this approach might work, the preferred way to achieve this kind
of batch reading is to implement RepositoryService.getItemInfos(). Here
you can return arbitrary ItemInfos in a single batch. The jcr2spi module
will then put these into the hirarchy without additional calls to the
spi layer. See also https://issues.apache.org/jira/browse/JCR-1797
Michael