Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

about xml transform performance

Posted on 2001-08-21
2
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Use Filtering Commands to Process Files in Linux

Learn how to manipulate data with the help of various filtering commands such as `cat`, `fmt`, `pr`, and others in Linux.

Question has a verified solution.

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

Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
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, …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

719 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