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 12:28:47 GMT
On May 8, 2008, at 14:06, paul womack wrote:
> Andreas Delmelle wrote:
>> 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.
> Hmm. As a compromise, I may be able to create a java class
> that accepts multiple "commandlines" from stdin.

A possible option: I once wrote a very small 'FOP server program'. No  
servlet container needed or anything, just a simple program that  
opens a socket, and listens for simple string requests in a form that  
suited me. A modified version of the example files, surrounded by an  
infinite loop.
If you know just a bit of Java, this should take only very little  
time. Programming threads and sockets in Java is a piece of cake,  
when compared to C.

Something like that suffices to keep the Java VM running until a  
forced shutdown, and avoid any startup overhead on all but the very  
first run.

I have only very little experience with Perl, but IIC, it should be  
equally straightforward to send the client request from within a script.

Maybe an idea for you.




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

View raw message