[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL-FO to PDF conversion speed

Subject: Re: XSL-FO to PDF conversion speed
From: Greg Hunt <greg@xxxxxxxxxxxxxx>
Date: Mon, 30 Sep 2013 20:23:40 +1000
Re:  XSL-FO to PDF conversion speed
If the problem is five seconds of a CPU-intensive process, optimising
JVM startup or FOP instantiation may not be the main issue.  So what
IS the issue?

Elapsed Time for one?
Elapsed time for lots?
System Capacity in an interactive context?
System Capacity needed for lots of the documents?

You need to measure the components of the problem: JVM startup, FOP
instantiation, transformation, saving the output, and work out what
you are left with if you can eliminate or reduce one or more
components in the contexts (focus on elapsed time, focus on capacity,
1 transform, 800 at a time, 800 per day) that you care about.  That
way you can predict which optimisations are likely to be worth
pursuing.

On Mon, Sep 30, 2013 at 7:26 PM, Adam Retter <adam.retter@xxxxxxxxxxxxxx> wrote:
> If you have many documents to render, this is a great fit for
> parallelism. Personally I would use a kinda producer/consumer pattern,
> whereby you have as many consumers as there are threads on the server
> where you are executing this. I would have then have the consumers
> pull jobs off of the producer and perform your FO transformation. In
> this way you should be able to do many documents in parallel and with
> the correct technology choice you could scale this across several
> servers to get a linear speedup. On the consumer, I would recommend
> reusing the same FO processor serially without stopping and starting
> the JVM, you need not use a Servlet for this, rather any Java code
> that does not terminate the JVM would work. IMHO Akka (with
> Clustering) is a perfect fit for this...
>
> On 30 September 2013 09:12, Jesper Tverskov <jesper@xxxxxxxxxxx> wrote:
>> Thanks so far.
>>
>> The present solution has 12 tables. I could probably do without some
>> of them and merge the rest into just 6 tables. That might give me a
>> small reduction in time.
>>
>> Now, my clients problem is bigger than my 5s for a single
>> transformation. They run a batch of 700-800 transformations (still
>> very few compared to the millions of runs others face as a challenge).
>>
>> Am I right that even for just 700-800 XSLT/FO transformations, there
>> is a lot to gain from using FOP in a servlet, or would you advise me
>> to go for a commercial FO processor right away?
>>
>> And what about the XSLT part. At the moment XALAN is used. My tests
>> for a single transformation show that not much is gained from using an
>> XSLT 2.0 processor (Saxon) and optimize the stylesheet for 2.0. I can
>> hardly measure the difference. Is this still true for a batch of
>> 700-800 transformations?
>>
>> Even split seconds gained ad up, but could there be other speed
>> benefits from using an XSLT 2.0 Saxon processor compared to good old
>> XALAN when we are talking about a batch job?
>>
>> Regards
>> Jesper
>>
>> On Mon, Sep 30, 2013 at 3:03 AM, Liam R E Quin <liam@xxxxxx> wrote:
>>> On Sun, 2013-09-29 at 12:46 +0200, Jesper Tverskov wrote:
>>>
>>>> I'm wondering why my FOP 1.0 conversion to a PDF file of just 2 pages
>>>> is so slow. We are talking about 5 seconds.
>>>
>>> Some of that will probably be JVM startup.
>>>
>>> There are ways to mitigate that (e.g. nailgun) or you could maybe run
>>> FOP from a servlet.
>>>
>>> Without timings, though, it's hard to guess.
>>>
>>> Liam
>>>
>>> --
>>> Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
>>> Pictures from old books: http://fromoldbooks.org/
>>> Ankh: irc.sorcery.net irc.gnome.org freenode/#xml
>>
>
>
>
> --
> Adam Retter
>
> skype: adam.retter
> tweet: adamretter
> http://www.adamretter.org.uk

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.