The first point to note is that timings from the command line are heavily
skewed by Java warm-up time. You can see this effect by using the
undocumented flag -3 which runs the query thrice - you'll often see that the
second and third executions are much faster than the first. For serious
performance measurement, you should write your own application that does its
The timings are obtained from the Java method (new Date()).getTime(), so
they represent "wall-clock time" rather than CPU time. Come to think of it,
this probably isn't a very good choice - I can't remember any particular
reason for doing it this way: and I see that the XSLT interface is using
System.currentTimeMillis(), so there's an inconsistency that needs to be
The execution time does NOT include the compilation time, but it DOES
include the tree building time. Of course the query can load multiple
documents using the doc() function so the tree building time may appear more
> -----Original Message-----
> From: saxon-help-admin@...
> [mailto:saxon-help-admin@...] On Behalf Of
> Enrico Zimuel
> Sent: 22 January 2006 17:30
> To: saxon-help@...
> Subject: [saxon] Elaboration times
> I would like to have more info about the elaboration times of SaxonB
> ver. 8.6.1.
> I'm running SaxonB from the command line with the -t option
> for display
> timing information. For instance i used the following command:
> $ java -Xmx1024m -cp /path/saxonb8-6-1/saxon8.jar
> net.sf.saxon.Query -t
> -o result.out query.xql
> where query.xql is the file containing my query. I obtain the
> Saxon 8.6.1 from Saxonica
> Java version 1.5.0
> Compiling query from query.xql
> Compilation time: 207 milliseconds
> Building tree for file:/path/doc.xml using class
> Tree built in 22424 milliseconds
> Tree size: 4006862 nodes, 0 characters, 4000000 attributes
> Execution time: 23244 milliseconds
> Some questions:
> 1) Are the times CPU elaboration times?
> 2) Is the execution time the total time of the SaxonB's elaboration?
> 3) Which are the definitions of the compiling query time and the tree
> built time for SaxonB?
> 4) Is it possible to obtain only the query execution time?
> For instance
> Query Execution Time= Execution time - Tree built time - Compilation
> time = 23244 - 22424 - 207 = 613 milliseconds. Is it correct?
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web.
> DOWNLOAD SPLUNK!
> saxon-help mailing list