Re: [xsl] XSL-FO to PDF conversion speed

Subject: Re: [xsl] XSL-FO to PDF conversion speed
From: "Kevin Brown" <kevin@xxxxxxxxxxx>
Date: Mon, 30 Sep 2013 10:04:56 -0700
> 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.

Certainly. Running a single document especially in a Java/bat/sh call will
never perform even close to a server-based solution. Unless the server is
written incorrectly and does things like clean-up after processing a single
document which would wipe the cache of things like fonts (and then load then
again on the next call).

Also fonts are involved in both startup and processing. Many people use
crazy fonts like Arial Unicode MS. The use of this font in a real conforming
(copyright aware) processor adds at least 356KB to the file size minimally
if you subset the font. This is because the font prolog is that large and
required for copyright consideration. And parsing a 26MB file to extract
this prolog and a single character takes time. As does pre-processing all of
the fonts that may be specified in the configuration at start-up.

Complex tables and especially nested tables are performance drains. Keeping
track of keeps and end of page conditions and possible table headers and
footers (not to mention the possibility of footnotes) is complex. I have
seen performance of documents double when removing nested tables when they
are not required.

Kevin Brown
RenderX

Current Thread