Zahigian, Mike wrote:
I am using FOP to take a single page of XSL:FO content and convert to PDF.
I have embedded FOP in a servlet. When I have one user requesting a page it
takes about 6 or 7 seconds to get the page formatted as PDF. It seems like
each additional simultaneous request pushes the response time by 6 or 7
seconds. So, if 10 users request pages at about the same time, the 10th
user gets his page back in about a minute--and this is only one page.
Is this the performance I should expect? What the ideal way to handle the
rendering process? Should I create a Rendering object that had a rendering
method or should I simply have a class with one static method that renders?
Any guidance on how to embed FOP and get better response time is
The design of the embedding hardly matters for performance.
The complexity of the layout usually matters.
How much time does FOP need to render your FO from the command
line? Does the time include the XSL transformation or is it FO
rendering only? Use the -d switch to get timings.
Do you use JDK1.3? Is HotSpot enabled? FOP is much slower on
JDK 1.2 and earlier.
Try to isolate the steps. Apply a profiler. You might find
bottlenecks where you'd expect them last.
In your case, I strongly suspect the bottleneck is data retrieval,
not FO rendering, 7 seconds for a page sounds too much. You ought
to get 1-2 pages per second on moderatly dated machines.