Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Performance with multiple users during transformation

From: Geert Josten <Geert.Josten@----------->
To:
Date: 12/1/2004 5:26:00 PM
I have a 250 KB XML to be transformed into another XMl

document. I am using a high end UNIX box with 8 CPUs

and 32 Gig RAM. 
Intially I was using Xalan and the timings for

transformation are as follows:

1 user : 3 secs

2 users: 6 secs

4 users: 8 secs



Then I changed to Saxon8 and the timings are
1 user : 1.5 secs
2 users: 3 secs
4 users: 4 secs
(I fear whats going to happen when 1000 users will use
the applicaiton)




You need to explain your measurement scenario more carefully. How is the
XSLT processor running - as a servlet? How are you measuring response time?
What is the think time between transactions? Are these transformations all
using the same stylesheet? Are you saving the compiled stylesheet in memory?
Are they all running in the same thread, or do you have a pool of
threads/processes?

I was about to ask the same questions.. :)



Bhupendra:

Running your processor as a servlet or in some other persistent form gives the opportunity to cache 
memory objects. Though 250Kb is not really big, it does take time to parse (read into memory).



Actually, usually the number of times a document (XSL or XML) is being read is of bigger impact on 
the performance than the document size. So you want to prevent reading documents multiple times when 
once would be sufficient.



By the way, I wouldn't be surprised if loading (and compiling) the stylesheet will prove to be 
slower than reading the 250K XML document..



Since Saxon is based on SAX parsing there should be no
memory constrained (Also my 32 Gig RAM is never
utilised more than 5GB at any time.)

No, that's a bad misunderstanding. Every XSLT processor today builds the

source document in memory. However, 250Kb is not particularly big. Again,

however, it depends on how you are scheduling the work, how much memory you

are allocating to the Java VM, and so on. 

On the other hand, it does make a difference if you catch the result as SAX events and/or serialize 
it directly instead of first creating a DOM tree out of it. :)



Though presumably not that much as saving the compiled stylesheet...



G.


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent