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: Efficient way of loading multiple properties of a node?
Date Tue, 24 Oct 2006 12:31:46 GMT
Hi,

On 10/24/06, Marcel May <marcel.may@consol.de> wrote:
> I rather thought about aggressive loading for the bulk operations, when
> all nodes or properties are iterated. I'd like the Node.getProperties() or
> Node.getProperties("somePattern") to fetch the properties not through the
> LazyItemIterator which always preloads the next item but in one bulk
> call to the backend (for my case, a database). The same applies to
> Node.getNodes() and Node.getNodes("somePattern").

Good point, I agree.

JCR-RMI already does some of this optimization by accessing remote
iterators in bulk steps, but it still needs to do a network roundtrip
if you access the property contents with a call like
Property.getString().

In Jackrabbit the main limitation to this kind of a optimization is
the PersistenceManager interface that essentially serializes content
access to a sequence of individual node and property accesses. The
persistence implementation can do some caching to improve performance
in common cases, but there's no way for the higher levels to
communicate heuristics like Node.getProperties() being called to the
persistence layer.

> BTW, I'm willing to help out for this as this part is essential for my
> company and the current project using Jackrabbit JCR.
> Like by providing a benchmark examples (with Jamon monitors), patches etc.

Nice, thanks! Well defined benchmarks is an area where we are
currently lacking, so any help is much appreciated.

> > PS. There actually is one way to achieve batch property access in JCR,
> > namely the XML export feature. [...]
> I'll look at this. Interesting workaround, though a bit of hack I
> guess. Quite creative :-)

Thanks. :-) Note that this only helps when using JCR-RMI or some other
layer that works on top of the JCR API with high latencies. This wont
help when using Jackrabbit locally, since the Jackrabbit XML exporter
essentially invokes the same node and property access calls that a
normal client would to get the same content.

BR,

Jukka Zitting

Mime
View raw message