Jeremias Maerki wrote:

I've been made aware that the current way failed URIs are handled in the
image cache may not be ideal: If a URI is only temporarily unavailable,
the image identified by this URI will remain invalid until the JVM is
restarted or the cache is cleared explicitely.

The reason for the failed set is that FOP accesses an image twice for a
single document (FO stage and rendering stage). For a slow connection,
that would slow down the formatter quite a bit.

How about this? Each entry in the failure set gets a time stamp and a
timeout will invalidate the entry, forcing a retry next time the URI is
accessed. The timeout could be set to 0, which would effectively disable
that failed set. A value > 0 would set the timeout to n seconds. And a
negative value equals to infinity which would represent the current
behaviour.

I like this proposal, so +1.

Just to provide some context, imagine you are batch processing 1000 documents and they all use the same image. If the images are served by a remote servlet and a network glitch causes the 500th document to fail to retrieve the image then documents 501-1000 will all fail. Really only document 500 should fail.

Providing such a configuration setting lets the user decide whether to scarifice performance in favour of robustness.


If nobody sees a problem with that I'll implement that shortly.

Thanks,

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to