You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "S. Jayaraman" <sj...@consor.ch> on 2002/03/07 15:57:11 UTC

AW: FopImageFactory caches too aggressively

I think, this is a good method to be made available.
If the system is used to print manuals involving a lot of diagrams, this
call would be very useful (if different types of manuals are printed in
sequence.
But this will not solve the problem of one fo file having a number of
complex (large) diagrams, unless the renderer itself keeps flushing the
cache.. Is any such thing foreseen as an option to the renderer ?

Rgds
Jay


-----Ursprüngliche Nachricht-----
Von: Peter Murray [mailto:pete@subx.com]
Gesendet: Donnerstag, 7. März 2002 15:57
An: fop-user@xml.apache.org
Betreff: FopImageFactory caches too aggressively



Greetings group,

The FopImageFactory class appears to cache all references to images from
within rendered fop documents.  If you are running FOP in a server process,
(a) this might cause a memory problem and (b) if images change between
renderings (as they do in my case), I get the old copy of the image rather
than the latest.

How would people feel about adding a static method
FopImageFactory.clearCache()?  Of course, this won't really be what is
needed 'cause if you are rendering fops in multiple threads, you might want
the cache to be a little more persistent than if each thread is flushing it
after rendering a fop...

What do folks think about this?

-pete

--

Peter M. Murray
s u b x, i n c.
428 Fore Street
4th Floor
Portland, Maine 04101
v. 207.775.0808
f. 617.249.0617
pete@subx.com


Re: AW: FopImageFactory caches too aggressively

Posted by Peter Murray <pe...@subx.com>.
How about a FopImageFactory.setCacheImages(boolean flag) method?  So you
could turn off caching entirely?  That's really what my current application
would like - methinks.

-pete
peter m. murray
pete@subx.com


On 3/7/02 9:57 AM, "S. Jayaraman" <sj...@consor.ch> wrote:

> I think, this is a good method to be made available.
> If the system is used to print manuals involving a lot of diagrams, this
> call would be very useful (if different types of manuals are printed in
> sequence.
> But this will not solve the problem of one fo file having a number of
> complex (large) diagrams, unless the renderer itself keeps flushing the
> cache.. Is any such thing foreseen as an option to the renderer ?
> 
> Rgds
> Jay
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Peter Murray [mailto:pete@subx.com]
> Gesendet: Donnerstag, 7. März 2002 15:57
> An: fop-user@xml.apache.org
> Betreff: FopImageFactory caches too aggressively
> 
> 
> 
> Greetings group,
> 
> The FopImageFactory class appears to cache all references to images from
> within rendered fop documents.  If you are running FOP in a server process,
> (a) this might cause a memory problem and (b) if images change between
> renderings (as they do in my case), I get the old copy of the image rather
> than the latest.
> 
> How would people feel about adding a static method
> FopImageFactory.clearCache()?  Of course, this won't really be what is
> needed 'cause if you are rendering fops in multiple threads, you might want
> the cache to be a little more persistent than if each thread is flushing it
> after rendering a fop...
> 
> What do folks think about this?
> 
> -pete
> 
> --
> 
> Peter M. Murray
> s u b x, i n c.
> 428 Fore Street
> 4th Floor
> Portland, Maine 04101
> v. 207.775.0808
> f. 617.249.0617
> pete@subx.com
> 

-- 

Peter M. Murray
s u b x, i n c.
428 Fore Street
4th Floor
Portland, Maine 04101
v. 207.775.0808
f. 617.249.0617
pete@subx.com