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

Re: Templates.newTransformer synchronization

Subject: Re: Templates.newTransformer synchronization
From: "Mohsen Saboorian" <mohsens@xxxxxxxxx>
Date: Mon, 17 Jul 2006 17:26:47 +0330
saboorian
I cached a number of transFactory.newTemplates(xslSource) instances
inside a synchronozed map. Then used a servlet to generate the html
output of the transformation. Using Microsoft Application Center Test
(web based stress tester), with 30 simultaneos connections, and 1000
times of a request to that servlet
Saxon: had no problem with that.
Xalan: gives ArrayIndexOutOfBound:
------------------
java.lang.ArrayIndexOutOfBoundsException: -1
	at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2._exptype2(SAX2DTM2.java:1925)
	at com.sun.org.apache.xml.internal.dtm.ref.sax2dtm.SAX2DTM2.getNodeNameX(SAX2DTM2.java:2666)
	at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.getNodeNameX(DOMAdapter.java:264)
	at tabular$1.test(pred(=(variable-ref(colName/node-set), funcall(name, []))))
---------------------
When I cached translets (instead of translet.newTransformer()), there
was no problem with Xalan.
So I think this could not be thread-safe.

About the test result:
_______________________
Saxon (8.7.1)
Properties
Test type: Dynamic
Simultaneous browser connections: 2
Warm up time (secs): 0
Test duration: 00:00:00:42
Test iterations: 1,000
Detailed test results generated: Yes
Summary

Total number of requests: 6,000
Total number of connections: 6,000

Average requests per second: 142.86
Average time to first byte (msecs): 7.13
Average time to last byte (msecs): 7.31
Average time to last byte per iteration (msecs): 43.84

Number of unique requests made in test: 6
Number of unique response codes: 1

--------------------

Xalan (JRE 5)
Properties
Test type: Dynamic
Simultaneous browser connections: 2
Warm up time (secs): 0
Test duration: 00:00:00:34
Test iterations: 1,000
Detailed test results generated: Yes
Summary

Total number of requests: 6,000
Total number of connections: 6,000

Average requests per second: 176.47
Average time to first byte (msecs): 5.04
Average time to last byte (msecs): 5.22
Average time to last byte per iteration (msecs): 31.32

Number of unique requests made in test: 6
Number of unique response codes: 1
_______________________

Xalan overall time: 34sec
Saxon overall time: 42sec.

My XSLT was version 1.0.
I used no specific configuration for either libraries, so the results
may be inaccurate.

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.