xsl-list
[Top] [All Lists]

Re: XSL Transformation overhead

2005-01-13 02:54:41
Actuallly Michael, per your advice I built it such that you can add as
many elements as you want and whatever command line switches you
desire.  The XML Config file to do this looks like:

[btw... my apologies, I thought you were aware that I had built this
after taking your advice from a few weeks ago]:

<?xml version="1.0"?>
<output>
  <files>
    <source href="test-group.xml"/>
  </files>
  <defaults>
    <processor id="saxon" call="Saxon8.jar">Saxon 8.1.1 form
Saxonica</processor>
    <platform id="java" call="java">Java 1.4.2_4 from Sun
Micrososystems</platform>
    <command-line id="cmdln" default-switch="-">
      <switch call-id="java" no-switch="true"/>
      <switch value="ms" multiple-of="1024" use="512m">Sets the
minimum heap size for the Java VM</switch>
      <switch value="mx" multiple-of="1024" use="512m">Sets the
maximum heap size for the Java VM</switch>
      <switch value="jar">Tells the Java VM to use the Java Archive
option</switch>
      <switch call-id="saxon" no-switch="true"/>
    </command-line>
  </defaults>
  <sequence>
    <node call-id="cmdln" />
    <node>t</node>
    <node>o</node>
    <node>in-xml</node>
    <node>in-xsl</node>
    <node>capture-t</node>
  </sequence>
  <sequence>
    <node call-id="cmdln" />
    <node>t</node>
    <node>3</node>
    <node>o</node>
    <node>in-xml</node>
    <node>in-xsl</node>
    <node>capture-t</node>
  </sequence>
  <sequence>
    <node call-id="cmdln" />
    <node>t</node>
    <node>9</node>
    <node>o</node>
    <node>in-xml</node>
    <node>in-xsl</node>
    <node>capture-t</node>
  </sequence>
</output>

An example of a .bat file this creates looks like:

java -ms512m -mx512m -jar Saxon8.jar -t -9 -o o-1000.xml 1000.xml
test-group-m.xsl 2>execution-results\o-1000.xml-m-3.txt

And the output info after all nine times through the 1000 element
node-set from this looks like:

Saxon 8.1.1 from Saxonica

Java version 1.5.0

Stylesheet compilation time: 422 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 78 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 609 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 31 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 391 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 0 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 328 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 15 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 359 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 0 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 328 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 0 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 375 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 0 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 344 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 16 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 453 milliseconds

Processing file:/C:/test/output/1000.xml

Building tree for file:/C:/test/output/1000.xml using class
net.sf.saxon.tinytree.TinyBuilder

Tree built in 16 milliseconds

Tree size: 1001 nodes, 0 characters, 1998 attributes

Execution time: 547 milliseconds

On Thu, 13 Jan 2005 09:44:33 -0000, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:
you can access a test suite I developed that will help create an array
of various transformation scenarios that builds a .bat file for each
test as well as a master bat files that calls each test one after
another until complete.

I don't think that performance figures obtained from the command line are
representative, certainly for anything under a second. They are too heavily
distorted by Java start-up costs. It's much better to use a Java driver
application that runs each transformation multiple times, ideally ignoring
outlier results.

Michael Kay
http://www.saxonica.com/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
<M:D/>

:: M. David Peterson ::
XML & XML Transformations, C#, .NET, and Functional Languages Specialist

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>