jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Checking if node exists
Date Fri, 23 Nov 2007 11:06:18 GMT
Hi,

On Nov 22, 2007 10:21 PM, hsp_ <piccinatto@ibest.com.br> wrote:
> Which is faster Jukka?

The Session.itemExists() and Node.hasNode() calls are roughly
equivalent in performance. If you already have an ancestor node
reference, then using Node.hasNode() with the relative path is
probably a bit faster.

The main performance gain from itemExists() or hasNode() as compared
to methods like getNode(), is that they don't need to load the node
state of the referenced node, just the node states of all the ancestor
nodes which are typically already cached in memory.

BR,

Jukka Zitting

Mime
View raw message