These results are certainly interesting, though I wouldn't want anyone to
think they are typical. (I'd quite like to see the transformation in
question to see what it's doing).
In general I think it *is* true that the object creation overheads in JDK
1.4 have come down to the point where the cost of building the standard tree
is not significantly greater than the cost of building the tiny tree,
assuming you have enough memory. In addition, most navigation paths cost
about the same with both models: but there are certainly some exceptions
where navigating the tinytree will be significantly slower. The main benefit
of the tinytree is memory rather than speed - this is important not only for
transformations of large documents, of course, but also for high-throughput
web sites doing server-side transformation of many small documents. And of
course, using less memory means you spend less time garbage collecting.
For an identity transformation of a 3Mb document I'm seeing the parsing and
tree building time roughly the same with both models (about 400ms), and the
transformation time about 5% faster with the standard tree. For an identity
transformation of an 18Mb document the parsing and tree-building time is
about 20% better with the tinytree (3000ms vs 3600ms) and the total
transformation time is about the same - except in one run where the garbage
collector was invoked, when the standard tree took three times as long.
But thanks for drawing attention to the fact that when you're looking for
performance, it's always worth trying both tree models.
> -----Original Message-----
> From: saxon-help-admin@...
> [mailto:saxon-help-admin@...] On Behalf Of
> Colin Paul Adams
> Sent: 05 September 2004 07:10
> To: saxon-help@...
> Subject: [saxon] Standard tree versus tiny tree
> I've been doing some timings, and I thought people might be interested
> in my results.
> Saxon 8.0B running on Fedora Core 2 Linux with plenty of memory.
> Transforming a file 3,534,521 bytes in size to one 21,994,398 bytes in
> size. Changing the memory allocated to the garbage collector
> has little
> significant effect.
> Running with the tiny tree results in elapsed times of between 75 and
> 80 seconds.
> Running with the standard tree results in elapsed times of between 12
> and 18 seconds. Reducing the maximum memory to the garbage collector
> from 32MB to 16MB makes this time go out to around 60-65
> seconds. Increasing the memory up to 256MB has no significant effect.
> In either case, reducing the memory to the garbage collector from 16MB
> to 8MB means the transform will no longer run.
> Colin Paul Adams
> Preston Lancashire
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> saxon-help mailing list