Re: [xsl] Using Saxon 2.0 with FOP, XEP, Antenna House

Subject: Re: [xsl] Using Saxon 2.0 with FOP, XEP, Antenna House
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Fri, 18 Oct 2013 20:59:57 +0100
On 18 Oct 2013, at 10:34, Jesper Tverskov wrote:

> Hi Michael
>
> When I do a Saxon transformation to XSLFO at the command line, my file
takes:
>
> a) Stopwatch time:  7.5s.
>
> The "-t" tells me that:
>
> b) Stylesheet compilation time: 2398ms
> c) Building tree input file: 86ms
> d) Execution time: 531ms.
>
> Does it mean that:
>
> e) start-up time  =  a - (b+c+d)

No, because the VM warms up gradually: it loads classes as they are needed,
and the hotspot compiler gradually speeds up the most frequently executed
code, learning as it goes. So there's still a lot of "warm-up" happening after
Saxon starts the clock. To get timings that eliminate warm-up overhead, you
need to use the -repeat option - for something that takes 7s, I would start
with -repeat:20.
>
> Am I right that when doing 1000 transformations with the .NET or Java
> Interface, I only have 1 start-up time and 1 compilation time? And
> 1000 times c + d?

Yes to the first question. To the second, it will probably be rather faster
because the first transformation always takes much longer than subsequent
ones.
>
> Also I have tested the loading of a directory and output to directory
> feature at the command line in Saxon. It works well, but I don't
> think, I can get a FO-processor to take over such an output directory
> as input to the FO transformation from within the bat file.
>
Other possibilities are to organize the processing using XProc, xmlsh, or ant;
or to write custom control logic in Java; or to write it in XSLT, with a
stylesheet that uses the collection() function to process many input files.

Michael Kay
Saxonica

Current Thread