DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28146>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28146

'out of memory' when transforming large result sets.





------- Additional Comments From [EMAIL PROTECTED]  2004-04-16 19:47 -------
Yes, Xalan builds an in-memory model of the document. We use a fairly compact
representation for that purpose (DTM), but it does unavoidably consume memory.

The DB2 adapter kluges around this by simulating a partial DTM, which supports
only forward traversal through the document. Obviously, that means it only works
with some XPaths and some stylesheets... but for that subset, this is a more
efficient approach.

Ideally, we'd really want to be able to analyse a stylesheet and apply that sort
of optimization automagically, not building subtrees which provably don't affect
the XPath/XSLT results and discarding subtrees which have been provably
completely processed and will no longer affect results. (See discussions of
"filtering" and "pruning" in archives of the Xalan mailing lists.) Similar
management could and should be applied to the source-document cache -- we keep
documents in memory in case document() refers back to them, and if we could
detect when that's no longer necessary we could recover that storage.

As Brian said, this is not easy... but I've recently heard of some work which
_may_ finally get us started along that path, if it proves out.


Another possible opportunity for storage reduction: Interpretive XALAN manages
result tree fragments ("temporary trees") using a "shared DTM" mechanism, which
tries to treat a single DTM as a stack of trees rather than allocating multiple
DTMs. If your stylesheet creates a lot of RTFs, this can reduce memory overhead
somewhat. As far as I know, XSLTC does not currently try to take advantage of
that capability; at some point we need to consider reintroducing it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to