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 Theresa Jayne Forster <th...@inbrand.co.uk> on 2011/12/05 14:22:20 UTC

Why the difference in speed?

Hi All, 

 

Just wondering , we used to run 0.20.5 as a fop.exe and saving the input
files and then execing fop.exe 

This was mind blowingly fast at generating the pdf.

 

Now I am trying to use Fop 1.0 and doing it all programmatically, it is
significantly slower specifically for the creation of the FOP from the
fopFactory and then the transform. 

 

What could be slowing it down like this, with 0.20.5 we were using fonts
declared with the fopconfig.xml and kerning files

The new one we are using autodetect - could this be the issue should I
generate the font config as before rather than use the autodetect?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer




Re: Why the difference in speed?

Posted by Pascal Sancho <pa...@takoma.fr>.
Theresa,

file:/// means the root of your local system.

You should check if the file is in the right place, and if FOP has read
permission on it.


Le 05/12/2011 16:10, Theresa Jayne Forster a écrit :
> Ok, I tried setting up a font definition but I am getting an error no
> matter what font I try to get going, and the error is non descriptive
> 
>  
> 
> Any idea why I am having this problem?
> 
>  
> 
> Font file
> 
>                                 <renderer mime="application/pdf">
> 
>                                                 <fonts>
> 
>                                                                 <font
> embed-url="file:///InBrand/fonts/FRUTL__.TTF">
> 
>                                                                  
> <font-triplet name="Frutiger" style="normal" weight="200"/>
> 
>                                                                
> </font>                                                                               
> 
> 
>                                                                
> <auto-detect/>
> 
>                                                 </fonts>
> 
>                                 </renderer>
> 
>  
> 
> The error
> 
>  
> 
> Creating New Fop
> 
> org.apache.fop.apps.FOPException: Failed to resolve font with embed-url
> 'file:///InBrand/fonts/FRUTL__.TTF'
> 
>                 at org.apache.fop.util.LogUtil.handleError(LogUtil.java:38)
> 
>                 at
> org.apache.fop.fonts.FontInfoConfigurator.getFontInfo(FontInfoConfigurator.java:212)
> 
>                 at
> org.apache.fop.fonts.FontInfoConfigurator.addFonts(FontInfoConfigurator.java:168)
> 
>                 at
> org.apache.fop.fonts.FontInfoConfigurator.configure(FontInfoConfigurator.java:100)
> 
>                 at
> org.apache.fop.render.PrintRendererConfigurator.buildFontList(PrintRendererConfigurator.java:106)
> 
>                 at
> org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:129)
> 
>                 at
> org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)
> 
>                 at
> org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:181)
> 
>                 at
> org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:73)
> 
>                 at
> org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130)
> 
>                 at
> org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:102)
> 
>                 at
> org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:359)
> 
>                 at
> org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)
> 
>                 at
> org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)*
> 
>                 at org.apache.fop.apps.Fop.<init>(Fop.java:79)
> 
>                 at
> org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)
> 
>                 at
> uk.co.inbrand.fopengine.FopEngine.generatePDFFromXml(FopEngine.java:166)
> 
>                 at
> uk.co.inbrand.fopengine.FopProcessor.run(FopProcessor.java:43)
> 
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 
>                 at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 
>                 at java.lang.Thread.run(Thread.java:619)
> 
>  
> 
> Kindest regards
> 
>  
> 
> 
> Theresa Forster
> 
> Senior Software Developer
> 
> *From:*Theresa Jayne Forster [mailto:theresa@inbrand.co.uk]
> *Sent:* 05 December 2011 13:22
> *To:* fop-users@xmlgraphics.apache.org
> *Subject:* Why the difference in speed?
> 
>  
> 
> Hi All,
> 
>  
> 
> Just wondering , we used to run 0.20.5 as a fop.exe and saving the input
> files and then execing fop.exe
> 
> This was mind blowingly fast at generating the pdf.
> 
>  
> 
> Now I am trying to use Fop 1.0 and doing it all programmatically, it is
> significantly slower specifically for the creation of the FOP from the
> fopFactory and then the transform.
> 
>  
> 
> What could be slowing it down like this, with 0.20.5 we were using fonts
> declared with the fopconfig.xml and kerning files
> 
> The new one we are using autodetect – could this be the issue should I
> generate the font config as before rather than use the autodetect?
> 
>  
> 
>  
> 
> Kindest regards
> 
>  
> 
> 
> Theresa Forster
> 
> Senior Software Developer
> 

-- 
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Why the difference in speed?

Posted by Theresa Jayne Forster <th...@inbrand.co.uk>.
Ok, I tried setting up a font definition but I am getting an error no matter
what font I try to get going, and the error is non descriptive

 

Any idea why I am having this problem?

 

Font file 

                                <renderer mime="application/pdf">

                                                <fonts>

                                                                <font
embed-url="file:///InBrand/fonts/FRUTL__.TTF">

 
<font-triplet name="Frutiger" style="normal" weight="200"/>

                                                                </font>


 
<auto-detect/>

                                                </fonts>

                                </renderer>

 

The error 

 

Creating New Fop

org.apache.fop.apps.FOPException: Failed to resolve font with embed-url
'file:///InBrand/fonts/FRUTL__.TTF'

                at org.apache.fop.util.LogUtil.handleError(LogUtil.java:38)

                at
org.apache.fop.fonts.FontInfoConfigurator.getFontInfo(FontInfoConfigurator.j
ava:212)

                at
org.apache.fop.fonts.FontInfoConfigurator.addFonts(FontInfoConfigurator.java
:168)

                at
org.apache.fop.fonts.FontInfoConfigurator.configure(FontInfoConfigurator.jav
a:100)

                at
org.apache.fop.render.PrintRendererConfigurator.buildFontList(PrintRendererC
onfigurator.java:106)

                at
org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererC
onfigurator.java:129)

                at
org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:165)

                at
org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:
181)

                at
org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:73)

                at
org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:130)

                at
org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:102)

                at
org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.j
ava:359)

                at
org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:105)

                at
org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:101)*

                at org.apache.fop.apps.Fop.<init>(Fop.java:79)

                at
org.apache.fop.apps.FopFactory.newFop(FopFactory.java:271)

                at
uk.co.inbrand.fopengine.FopEngine.generatePDFFromXml(FopEngine.java:166)

                at
uk.co.inbrand.fopengine.FopProcessor.run(FopProcessor.java:43)

                at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)

                at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)

                at java.lang.Thread.run(Thread.java:619)

 

Kindest regards

 


Theresa Forster

Senior Software Developer



From: Theresa Jayne Forster [mailto:theresa@inbrand.co.uk] 
Sent: 05 December 2011 13:22
To: fop-users@xmlgraphics.apache.org
Subject: Why the difference in speed?

 

Hi All, 

 

Just wondering , we used to run 0.20.5 as a fop.exe and saving the input
files and then execing fop.exe 

This was mind blowingly fast at generating the pdf.

 

Now I am trying to use Fop 1.0 and doing it all programmatically, it is
significantly slower specifically for the creation of the FOP from the
fopFactory and then the transform. 

 

What could be slowing it down like this, with 0.20.5 we were using fonts
declared with the fopconfig.xml and kerning files

The new one we are using autodetect - could this be the issue should I
generate the font config as before rather than use the autodetect?

 

 

Kindest regards

 


Theresa Forster

Senior Software Developer


Re: Why the difference in speed?

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi Theresa,

unless you want to play with whole system fonts, you should configure
only a limited set, either registring each font namely, or grouping them
in a directory that you can register with a single command.
See [1] for further details

Note that there are many other reasons that can explain slow down:
 - disabled fontcache (option cache-file)
 - strict mode (should not be disabled, IMHO) (option strict-configuration)
 - etc.


[1] http://xmlgraphics.apache.org/fop/1.0/fonts.html#register

Le 05/12/2011 14:22, Theresa Jayne Forster a écrit :
> Hi All,
> 
>  
> 
> Just wondering , we used to run 0.20.5 as a fop.exe and saving the input
> files and then execing fop.exe
> 
> This was mind blowingly fast at generating the pdf.
> 
>  
> 
> Now I am trying to use Fop 1.0 and doing it all programmatically, it is
> significantly slower specifically for the creation of the FOP from the
> fopFactory and then the transform.
> 
>  
> 
> What could be slowing it down like this, with 0.20.5 we were using fonts
> declared with the fopconfig.xml and kerning files
> 
> The new one we are using autodetect – could this be the issue should I
> generate the font config as before rather than use the autodetect?
> 
>  
> 
>  
> 
> Kindest regards
> 
>  
> 
> 
> Theresa Forster
> 
> Senior Software Developer
> 

-- 
Pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org