The performance of FOP needs quite a bit of work. At least thats the
impression I get from many people round here. However, its really new
software ( hanve version 0.20 I would imagine ), and I think that that
probably the coders are working on getting the functionality there
before spending time concentrating on the performance.
One thing you will find is that the first run through the code takes by
far the longest time. The JVM needs to load all the relevant classes,
initialise them, and that kind of thing. Once this has been done, the
JVM (if you have it switched on) will potentially compile some of the
code, rather than interpret the java byte code. This can improve the
speed significantly.
The other thing you need to check is for your JVM memory settings. If
you use the default, then FOP may cause the free heap space to go
dangerously low, increasing the frequency of full GC runs. These are
best avoided, as all threads are suspended during the GC phase. Adding
memory to the heap can cause these problems to diminish, (perhaps adding
up to 256m, using the -Xms and -Xmx flags ), but then you may find that
full GCs take too long ...You may also want to take a look at the Eden
heap space settings, these could significantly increase speed if
slowdown is due to memory & GC issues, as a result of short-lived objects.
Of course if you are adding memory to the JVM heap, then you should also
make sure that you have anough physical memory, or this may cause VM
paging at the OS level. I would say 256 or 512M as minimum requirement.
When running on UNIX i have seen a significant amount of kernel CPU
usage, which i cannot really account for....
In short, then. If you want FOP to run more quickly, render more than
one document during the JVM lifetime. The first rendering will be slow,
but subsequent ones much more speedy. And add memory.
Hope this helps
James
Lukas Pietsch wrote:
>
>
>
> Hello,
>
> (I asked this question on the [EMAIL PROTECTED] list first, but was told to
> better go here with it.)
>
> I'm new to xsl-fo and related matters and I've just managed to set up FOP
> (0.20.2) and make a few test runs. I'm now wondering a bit about its
> performance. Parsing a single test xml document (a docbook chapter) with
> just a few words in it, transforming it with the docbook xsl stylesheets
> and outputting to pdf takes more than 40 seconds. It's fifteen seconds
> before I even get the debug line ("[DEBUG]: using SAX parser
> org.apache.xerces.parsers.SAXParser"). Afterwards, it says "[DEBUG]: Avg
> render time: 10600ms/page".
> Is this considered normal? It makes me wonder if my FOP installation (or
> indeed my Java installation) is set up correctly. Cyril Rognon on the
> www-xsl-fo list confirmed he found it rather too slow.
>
> This is on Windows 98, with a 500MHz AMD-K6 processor and 128 MB memory,
> using FOP 0.20.2 (sorry, I wrongly said 0.20.0 in the earlier mail) and the
> Java JRE 1.3.1.
>
> What could I do to diagnose the problem better?
>
> Thanks for any pointers,
>
> Lukas Pietsch
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]