[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Reusing XT instances
Hi Bob, It depends on your context ! The XSLServlet works in a servlet environment which is multi threaded and it wouldn't be safe to use the same object. However, the longest operation is the parsing of the XSLT transformation which is done before the XSLProcessor is cached and therefore, this parsing is reused. The driver is a different story since it's running in it's own java VM. Hope this helps. Eric Robert Streich wrote: > > Does anyone have any experience with reusing an XT object > (XSLProcessorImpl)? > > In looking through James' code, it's mixed. In com.jclark.xsl.sax.Driver, he > reuses the object. But in com.jclark.xsl.sax.XSLServlet, he clones a new > instance every execution (including creating a new parser). > > If possible, I'd like to reduce the creation and destruction of a bunch of > objects for lots of pretty short transformations. On the other hand, I'd like > to be safe (that is without looking through all to code to look for the > possibility of retained states). > > Any thoughts or experiences on the subject? > > thanks, > > bob > > Robert Streich > Calico Commerce > rstreich@xxxxxxxxxx > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- ------------------------------------------------------------------------ Eric van der Vlist Dyomedea http://www.dyomedea.com http://www.ducotede.com ------------------------------------------------------------------------ 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
|