Richard Mixon (qwest) wrote:
I know at one point in
the earlier API, it was recommended to create the Driver once and do a
driver.reset() each request.

Because the rendering methods are synchronized, using a single Driver object will serialize requests. In some sense this will conserve ressources, but it will be bad for answer times in high load situations, especially on multi-processor machines.

Keeping a Driver object will also lock some classes in memory which
are expensive to load. Well, if PDFs aren't generated often, compared
to other requests, preventing classes from being garbage collected is
not exactly a resource conservation, but it is certainly good for the
latency of the PDF generation.

I notice that the transformer object has a
"reset()" method. Would it save much to create the transformer in my
servlet's "init" method and just do a transformer.reset() at the top of
the doGet for each file I process?

I wouldn't consider this a good idea. But then, it might fit your use case. You'll probably need a representative usage profile in order to make an informed decision.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to