Hi,

To read a node, the query engine currently uses:

    session.getCurrentRoot().getTree(path);

The query engine calls this whenever it has to evaluate a property. It
turns out internally the getCurrentRoot() method always calls
MicroKernel.getHeadRevision(). I wonder if this is required, and if yes,
why? The javadoc for this method is:

    /**
     * The current root as seen by this content session. Use
     * {@link Root#commit(ConflictHandler)} to atomically apply the
changes made in that
     * subtree the underlying Microkernel.
     *
     * @return  the current root
     */

Should I cache the Root instance in the query engine for the duration of a
query? Or would it be possible to change the Root implementation so this
is not needed?

Regards,
Thomas
 

Reply via email to