Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

about xml transform performance

Posted on 2001-08-21
2
Medium Priority
?
291 Views
Last Modified: 2008-03-17
we are now use apache's xalan for to process xml transform. but sometimes we should transform a big original xml file( about 1.4M), we get the test result is it need about more than 25 minutes to finish. but this is a web application and cant be acceptable. How could i improve the performance? and are there faster transformer?
0
Comment
Question by:seasmile
2 Comments
 
LVL 4

Accepted Solution

by:
edmund_mitchell earned 800 total points
ID: 6409535
There are several faster transformers.
The most current current benchmarks are here:
http://www.datapower.com/XSLTMark/res_2001_03_28.html#ChartOverall

and another benchmark is here:

http://www.tfi-technology.com/xml/xslbench.html

Neither are as up-to-date as they could be, but they'll give you a pretty good idea as to how far behind Xalan is.
If you need a Java-based processor, I would really recommend you look into either Saxon[1] or xt (if you don't use certain features of XSLT)[2].  Of these two, Saxon is what I'd recommend, hands down.  

Note that sometimes you can rewrite your stylesheet to improve performance as well - one simple example:
If I want to select the <d> elements from this xml:
<a>
  <b>
    <c>
      <d></d>
    </c>
    <c2>
      <d></d>
    </c2>
    <c3>
       <d></d>
    </c3>
  </b>
</a>


I can write select="//d" but that will waste tons of processing time, because the processor checks absolutely everywhere for <d> elements.  Much better is to tell it where to go whenever you can:
select='a/b/*/d'
This is just a simple example, but hopefully it conveys the point.  There are many improvements to performance besides this that can be made from a stylesheet-authoring perspective - the use of keys, etc.  Mike Kays book "XSLT: A Programmer's reference (2nd ed.) has some good suggestions, and you can find others on the web, too.

HTH

Edmund

[1] http://saxon.sourceforge.net/
[2] http://www.jclark.com/xml/
0
 

Author Comment

by:seasmile
ID: 6411941
Thank Edmund very much for your so detailed reply. I'll try the ways you told me. and of course I will give the points to you. thankx again.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question