xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Delmelle <andreas.delme...@telenet.be>
Subject Re: multiple outputs
Date Thu, 08 May 2008 08:48:28 GMT
On May 8, 2008, at 10:22, paul womack wrote:

Hi

I see Jeremias has already given info about the AT, so I'll restrict  
myself to some other pointers that may be of use.

> If I want a TIFF and a PDF from the same input (xml + xsl), what's
> my best course?

One very convenient way to generate multiple outputs is to use FOP's  
Ant task.
That would not require much intervention or Java knowledge.

> Clearly, running fop from the command line twice would work,
> but can I get a performance "win" by converting to an intermediate fo
> file, then doing a render run?

We can't really say, without knowing more about the XSL transform. It  
depends on whether performing the same transform two times in a row  
weighs up to writing the fo to disk and reading it back again.
Note that you can optimize multiple identical transforms by using a  
cached javax.xml.transform.Templates based on the same stylesheet.  
That at least saves you from having to parse the stylesheet twice (or  
more?)

> <snip />
>
> Or can I reduce the fop startup overhead by running two
> commands (how?) in the same instance?

Have a look at the embedding examples:
http://xmlgraphics.apache.org/fop/0.95/embedding.html#examples

If you would use FOP multiple times in a row, without restarting the  
JVM, then over a few runs that will save you minutes...
The very first run is always a lot slower due to static  
initialization, class loading etc. Once the VM is warmed up, the  
average runtime for a formatting run will drastically reduce. To see  
what I mean, you could already make the comparison: try 50 isolated  
runs from the command-line, and afterwards, perform the same 50 runs,  
but then looped in a single small class.


HTH!

Cheers

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message