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.
HTH!
Cheers
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]