Hmmm :-) I have edited my function that looks after the transformations so that it does one of four things..
- Compiles New Template -> Trows it away.. - Compiles New Template -> Keeps it, and returns the refrence - Reuses Template from Ref -> Throws it away.. - Reuses Template from Ref -> Keeps it, returning the ref.. The bit of code that deals with the list of jobs simply looks ahead to the next job in the list to see whether it is going to need the template again, and reuses the template if it has a valid refrence from it's predeccesor.. Changing this however has moved my run of 78 pages from 22 seconds to 6 seconds and the average transformation from 0.3 seconds to 0.07 seconds... Which is what... 30% of the original time.. Yipee!! ;-) Thanks for the help. Jim -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 25 June 2002 14:18 To: [EMAIL PROTECTED] Subject: Re: Xalan C++ document() tech question Hold on there cowboy. This question is for C++ not Java. >Could someone tell me how/when/where the "document()" XSLT function >actually happens... The document() function code is found in src\XSLT\FunctionDocument.cpp >I am using XML::Xalan (and Perl) to bind to Xalan C++ and currently >destroying the .xsl each time it is used.. Clearly you can compile the stylesheet and re-use it . Possibly passing parameter values for updated .xml files, however, I'm not sure if it's feasible to cache that many source documents, hopefully others will provide better solutions for problem. Paul "Joseph Kesselman" To: [EMAIL PROTECTED] <[EMAIL PROTECTED] cc: (bcc: Paul Dick/Cambridge/IBM) om> Subject: Re: Xalan C++ document() tech question 06/25/2002 09:14 AM Please respond to xalan-dev >Could someone tell me how/when/where the "document()" XSLT function >actually happens... The FuncDocument class currently implements this. Note that it's basically a call to DTMManager's getDTM operation. The current implementation of DTMManager does perform some caching, so if you're repeatedly accessing the same document within a single transformation, I _think_ we will simply re-access the same DTM. If you want to do some explicit caching, the easiest approach would be to assign the retrieved document to an XSLT variable and then use the variable, possibly via our provided nodeset() extension function. (It's worth noting that the current working draft for XSLT2 removes the need for that extension; the current plan is that it will allow you to directly search variables containing "temporary trees".) ______________________________________ Joe Kesselman / IBM Research
