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 08:50:21 GMT
Hi,

On 10/24/06, Alex Popescu <the.mindstorm.mailinglist@gmail.com> wrote:
> You are right Julian, but the spec doesn't say anything about batch
> propery fetching; so Steffan is right: it is an implementation detail.
> And if the implementation proves itself to go over the wire to fetch
> each property then this would be considered an important design bug in
> that implementation.

I'd call it a feature rather than a bug since there are cases where
aggressive caching of property values is not a good idea, for example
if you're just traversing the node tree, then prefetching the property
values will just slow things down. In any case it's an important
consideration that I certainly wouldn't discard as an implementation
detail. In fact I'd call the property access performance a major
non-functional feature, that we might want to specify some benchmarks
for to guide application developers on what to expect.

PS. There actually is one way to achieve batch property access in JCR,
namely the XML export feature. Create a custom ContentHandler that
simpy records the Attributes instance and ignores all other SAX event
information. Note that the received XML attributes may be encoded as
described in JSR 170, but for many use cases this is not a problem.
It's a bit of a hack, but if you're limited by a network layer like
JCR-RMI that needs to do a network roundtrip for each property access,
it might be the best option there is...

BR,

Jukka Zitting

Mime
View raw message