Hi Rajesh,
Xalan-C's model is very compact and you should see lower memory usage than
Xalan-J on 32-bit architectures. On 64-bit architectures, memory usage is
probably comparable. Of course, all of this depends on the kinds of
documents you're transforming. Content-heavy documents will use more
memory than markup-heavy ones. Even such details as the number of repeated
element and attribute names will affect how much memory the document
requires. There is also an undocumented mode in Xalan-C which pools all
text nodes, which can be very useful for documents that have lots of
repeated values.
On the other hand, you may want to investigate if your transformations can
be streamed, which would make them a good candidate for using a simple SAX
filter, rather than XSLT.
If you decide to use XSLT, you should try both Xalan-C and Xalan-J to see
which one works best with some typical stylesheets and documents. Just
make sure you have a representative sample for your testing.
Dave
Rajesh Raheja
<[EMAIL PROTECTED] To:
[email protected], [EMAIL PROTECTED]
com> cc: (bcc: David N
Bertoni/Cambridge/IBM)
Subject: Memory Consumption for
Large XML Transformation (50MB to 1GB) with SAX
12/08/2003 01:13
PM
Please respond
to rraheja
We are trying to transform very large XML documents (30MB to 1GB in size)
and
were planning on using an XSLT engine for it. Our tests showed that
passing in
the document in DOM typically crashed with out of memory errors.
however, even with passing in SAX events, the memory consumption was around
FIVE times the document size (e.g. the 50MB document input consumed 250MB
of
the jvm).
would appreciate any inputs on any way to improve the memory consumption
and
more generally - Is XSLT the way to go for such large documents? what are
the
alternatives (btw, we tried asking customer to reduce or break up the
document
- not feasible!)?
Thanks
Rajesh
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/