You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Andreas L Delmelle <a_...@pandora.be> on 2007/10/16 18:40:14 UTC

Re: svn commit: r585167 - /xmlgraphics/fop/trunk/src/java/org/apa che/fop/render/PrintRendererConfigurator.java

On Oct 16, 2007, at 18:32, Manuel Mall wrote:

>> jeremias@apache.org wrote:
>>
>>> Author: jeremias
>>> Date: Tue Oct 16 08:12:45 2007
>>> New Revision: 585167
>>>
>>> URL: http://svn.apache.org/viewvc?rev=585167&view=rev
>>> Log:
>>> Bugfix: If auto-detection is enabled, auto-detection didn't
>> get done starting with the second rendering run in the same
>> JVM. Static variables are dangerous!
>>
>> Hi Jeremias,
>>
>> auto detecting the Fonts is a very expensive operation. I'm
>> not sure I
>> want it to happen everytime I create an instance of a
>> Renderer object.
> <snip />
> I agree with Chris' comment here as I use fop in a heavy multi- 
> threaded
> server app and I certainly would not like the performance hit of font
> detection for each rendering run.

I agree as well, with both points. Jeremias is very right to be  
concerned about statics. Maybe a Singleton tied to the FopFactory  
could ease the pains here: no statics, and yet only initialized once.  
Add a utility method to the FopFactory if we really need the  
possibility to refresh.


Cheers

Andreas