On 25.04.2006 21:38:44 Singhal, Ramneek \(Exchange\) wrote:
> Sorry for not getting the solution.
> 
> Do you mean to say Options object should be created first and then I
> should start my 5 pdf conversion threads.

Yes.

> And I should remove  
> Options options = new Options(userConfigFile);
> Statement from the conversion code which runs in all threads.

Yes. Creating the Options object adds configuration data which is added
to a static variable. That makes it available to all threads, so there's
no need to reload the configuration each time.

> Currently I am using fop-0.20.5
> 
> -----Original Message-----
> From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, April 25, 2006 1:11 PM
> To: [email protected]
> Subject: Re: Fonts embedding
> 
> Yes, just create the Options object once. No need to reload the
> configuration each time. Not reloading it has the nice side-effect of
> making the system more stable.
> 
> Note: This is much more cleanly solved with the new API in the latest
> release: 0.92beta
> 
> On 25.04.2006 18:07:00 Singhal, Ramneek \(Exchange\) wrote:
> > Hi,
> > 
> > I am generating 5 pdf files in five threads from xsl-fo. Each thread 
> > does this :
> > 
> > Driver driver = new Driver(inputSource, out);               
> > File userConfigFile = new File("/home/devuser/testdir/fop-cfg.xml");
> > 
> > Options options = new Options(userConfigFile); driver.setLogger(new 
> > NullLogger());
> > driver.setRenderer(Driver.RENDER_PDF);              
> > driver.run();
> > 
> > ****(fop-cfg.xml defines the fonts to be used)
> > 
> > 
> > It seems that all threads sets fonts
> > 
> > Is it possible that fonts are read once and set in FOP, and all 
> > threads donot have to set the fonts and hence avoid file read 
> > operations for fonts. I think this will increase performance of my
> application.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to