On 19.07.2007 00:36:40 Andreas L Delmelle wrote: <snip/> > > It may make more sense to have a > > FlyWeightFactory (per object) per rendering run. Somebody (don't > > remember who, sorry) wrote that FOP cannot bring the CPU to 100%, > > probably due to synchronization issues. Could be worth investigating > > since this would mean we give away CPU cicles here. > > Could indeed be interesting to know if it's really the > synchronization or other aspects of FOP's architecture that would be > the cause of that. Using statics and the above utility method of > course makes performance greatly dependent on the cleverness of the > JVM implementation. > Other than that, /if/ any synchronization should be performed, then > it would seem better to do so on the lower level: with the original > patch, multiple calls to the fetch() method would be prevented from > being executed concurrently, even if none of them altered the > underlying Map.
In that context, I've recently started reading http://www.amazon.com/Java-Concurrency-Practice-Brian-Goetz/dp/0321349601/ which is a very enlightening book. I can only recommend it. <snip/> Jeremias Maerki