Re: Caching source document as an optimizationI
>In studying the Xalan docs, I come across references to source document >caching. In going through the APIs I don't see a reference to a >cacheable source interface. Can someone shed some light on this, please? This question would be more at home on the Xalan list, since it's highly Xalan specific. I'd suggest we take it there if you want to pursue it further. Xalan's "document manager" layer may (or may not; this is implementation-dependent behavior) retain documents for the lifetime of an transformation and/or for the lifetime of an XPath Context. The intent is to improve performance when several calls to the XPath API are made against the same set of documents, and/or when a stylesheet uses document() several times to access the same URI. The simple Xalan XPathAPI class _doesn't_ retain the cache past the end of the XPath's execution, but there's a separate CachedXPathAPI class which does so. Documents will be retained until the CachedXPathAPI object is discarded. The normal Xalan Transformer behavior is that documents are retained until the transformation ends. There is a hook -- OK, a kluge -- which can be used in some kinds of stylesheets to manually force a document out of the cache, which has some potentially ugly side effects but which can be used for cases where you are importing huge documents (or huge numbers of documents) briefly and are sure they can be discarded. This is strictly a short-term solution; the Xalan list has discussed some of our ideas on how we might improve both the model and the cache in the long run for better memory management. ______________________________________ Joe Kesselman / IBM Research XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format