On Wednesday 01 August 2007 15:45, [EMAIL PROTECTED] 
wrote:
> Andreas L Delmelle writes:
<snip/>
>  > I've been playing with trying to make the cache thread-local
>
> If in doubt, you could always make the caching multi-level.
> L1 is the current global cache. L2 is a thread-local equivalent
> of the same - all pointing to the same properties (if required)
> but with different access keys. The L2 cache in this case need
> have no contention at all,
>

I have been following this discussion with very little attempt to 
understand the intricate technical details of concurrent maps etc, but 
I am wondering why we don't apply the KISS principle here?

IIRC the original problem was that the FOP memory footprint for 
rendering large documents was causing issues. One set of culprits that 
were identified were the properties. Given that a FOP rendering run is 
single threaded, i.e. there are no threads created within FOP, why 
don't we start with a property cache per run? No threading issues, no 
performance issues, and large gains in memory footprint reduction.

That will even benefit the memory footprint of concurrent FOP runs.  
Admittedly not to the extend as globally shared cache would do, but it 
would be much simpler and we can use the standard Java collection 
classes to implement it.

What am I missing?

> Richard

Manuel

Reply via email to