atom feed10 messages in org.apache.jackrabbit.oak-commitsRe: svn commit: r1309458 - /jackrabbi...
FromSent OnAttachments
ste...@apache.orgApr 4, 2012 8:36 am 
Jukka ZittingApr 4, 2012 11:59 pm 
Stefan GuggisbergApr 5, 2012 12:43 am 
Michael DürigApr 5, 2012 1:30 am 
Jukka ZittingApr 5, 2012 1:37 am 
Thomas MuellerApr 5, 2012 1:48 am 
Jukka ZittingApr 5, 2012 1:51 am 
Thomas MuellerApr 5, 2012 2:51 am 
Jukka ZittingApr 5, 2012 2:59 am 
Thomas MuellerApr 5, 2012 7:03 am 
Subject:Re: svn commit: r1309458 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeState.java
From:Jukka Zitting (jukk@gmail.com)
Date:Apr 4, 2012 11:59:47 pm
List:org.apache.jackrabbit.oak-commits

Hi,

On Wed, Apr 4, 2012 at 5:36 PM, <ste@apache.org> wrote:

optimized getChildNode [...]         if (child == null && childNodeCount > MAX_CHILD_NODE_NAMES) {             String childPath = getChildPath(name); -            try { -                kernel.getNodes(childPath, revision, 0, 0, 0, null); +            if (kernel.nodeExists(childPath, revision)) {                 child = new KernelNodeState(kernel, childPath, revision); -            } catch (MicroKernelException e) { -                // FIXME: Better way to determine whether a child node exists             }         }

That's what I was wondering, is a nodeExists() call followed by getNodes() better than a getNodes() call by itself? Especially if we assume potential network overhead for both calls...

I'll spend some time over the next few days to get us started with initial performance benchmarks. That should help us make more informed decisions on cases like this.

BR,