xsl-list
[Top] [All Lists]

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

2013-10-19 07:14:52
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?

Regards
Jesper

On Fri, Oct 18, 2013 at 9:59 PM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
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 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


--~------------------------------------------------------------------
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>
--~--


--~------------------------------------------------------------------
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>
--~--