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

Re: Caching source document as an optimizationI

Subject: Re: Caching source document as an optimizationI
From: Joseph Kesselman <keshlam@xxxxxxxxxx>
Date: Wed, 5 Feb 2003 09:30:40 -0500
cachedxpathapi performance
>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


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.