Solved

about xml transform performance

Posted on 2001-08-21
2
281 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 200 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now