[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Memory housekeeping in Saxon and other XSLT proces

Subject: RE: Memory housekeeping in Saxon and other XSLT processors ...
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 10 Dec 2002 10:04:33 -0000
xslt memory requirements
> Hi, what do you guys do if you have HUGE XML instances that 
> your transforms generate? Let's assume for a moment you have 
> a transform that replicates the input document 2 billion 
> times, or something similarly silly that really creates a 
> HUGE string of output tree. Is there anything in Saxon (or 
> other XSLT processors) that would try to keep a hold on the 
> whole tree even though it dumps tags to the output stream? 
> Are there any switches I need to set to make sure that memory 
> for result trees is freed after a result node has been output?

In Saxon:

Result trees are never actually built as trees in memory, unless you ask
for the output as a DOMResult. Instead, each node is serialized as it is
written.

Temporary trees are built in memory, and are discarded by the garbage
collector when there are no remaining references to them (typically,
when the variable goes out of scope). Memory requirements are also
reduced by delaying the building of the tree until it is actually
needed.

Source trees (including trees loaded using the document() function) are
held in memory for the duration of the transformation. 

> 
> I am having a problem with an XSLT based database dumper that 
> ends up haging after a while. I'm not sure if it is the JDBC 
> driver or server that hangs, but it's possible that Saxon 
> accumulates memory allocations. 

I've noticed a similar effect when using the Saxon SQL extensions, the
access to the database seems to progressively slow down, though in my
case it still continues to completion. I think it's a JDBC phenomenon.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.