xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject Re: images rendered multiple times
Date Fri, 04 Aug 2006 21:45:54 GMT
Florin Marcus wrote:
> I have noticed that FOP is somehow calling image generator servlet twice 
> for every image.

FOP processes the images in several steps. At first, it reads the
dimensions of the image in order to determine how it fits in, then
the real image content is processed. It may happen that the image
data is requested twice, depending on whether the underlying image
processing libraries can buffer/cache the image data. In your case
it may also depend on what HTTP headers the web server set regarding
modification and cache controls; the libraries used by FOP may
interpret these.

Some options you can try:
- Serve GIF instead of PNG, if possible. This uses another library.
- Install JAI, if you haven't already done so (although I'm not sure
   whether FOP 0.9x will use JAI for PNG).
- Play around with the last-modified HTTP header, or cache controls.
   Check
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
   Unfortunately, I'm not enough of a HTTP wizard so I can't help
   further.  I don't know either how these headers are interpreted
   by the Java run time library. There may be other forums dedicated
   to this topic, which might be of more help.
- Implement caching in the server, if CPU load is a concern.

J.Pietschmann

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message