[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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

Subject: Re: [xsl] Using Saxon 2.0 with FOP, XEP, Antenna House
From: Jesper Tverskov <jesper@xxxxxxxxxxx>
Date: Sat, 19 Oct 2013 14:14:21 +0200

Hi Michael

I have made some C# code with 1000 input file names in an array (just
the same file for this test), I then made 1000 transformations in a
for-each loop and generated 1000 xslfo.xml files. "-repeat:1000"
predicted 8ms on average.

It took around 17s to create 1000 xmlfo files in .NET API
It took around 17s to create 3 xmlfo files at the command line.

I now need to get the FO-processor into the loop.

Please allow me one more question:

I have noticed that FO processors like FOP and Antenna House, both use
the XSLT processor indirectly, build-in so to speak, probably in order
to avoid the need for specifying both processors at the command line
and getting two start-up times?

For the same reason if speed counts at the command line, both
processors should be made with the same programming language?


On Fri, Oct 18, 2013 at 9:59 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> 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
>> 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
>> 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