Seeing your stacktrace and your explanations I can't help but suspect
that maybe the whole AWT font handling could have a strong influence on
performance. If I had free time, I think I'd profile the number of calls
and run time of the Java2DFontMetrics.setFont() method. It could be that
we're changing the font too often while also not reusing font instances
created earlier. I think the logic there is pretty dumb (only one font
is active at one point). I know from my Win32 days that allocating
resources in Windows is not really a cheap operation. Maybe that gets
you some more ideas in which direction to look.

Good luck!

On 24.01.2007 23:22:00 Daniel Noll wrote:
> Andreas L Delmelle wrote:
> > On Jan 24, 2007, at 04:30, Daniel Noll wrote:
> > 
> >> Andreas L Delmelle wrote:
> >>> If it turns out that 0.93 is slower on any JVM, then if you can, 
> >>> please send us the FO, so we can investigate what might be causing 
> >>> this. Is there anything special about the FO-file? (i.e. lots of 
> >>> markers, images, tables, particular FO-constructs...)
> >>
> >> FWIW we've noticed a similar issue with speed here, although in our 
> >> case we were comparing the speed of 0.20.5 to 0.93 so we hadn't 
> >> narrowed it down to being the very latest version.  The only thing 
> >> peculiar about our own FO files is that they are relatively heavy on 
> >> table usage. and often have large images (>1024px) which are scaled 
> >> down to a small size (~120px) for thumbnails.
> > 
> > Important question that hasn't been asked in this particular thread:
> > Does this occur only when using the AWT renderer, or is there a similar 
> > drop in processing speed when rendering to PDF or PS?
> > 
> > If it happens only with AWT, then the used JVM (AWT implementation) 
> > could be a key factor...
> 
> PDF is unchanged so yeah, it's probably something to do with the way AWT 
> is being called.
> 
> Also, the slowdown is much more noticeable on Windows 2000.  On Windows 
> XP it seems to be something like 1-2 times slower, on Windows 2000 we 
> measure it being more like 2-3 times slower.
> 
> On Windows 2000, pausing the application randomly during the conversion, 
> it almost always pauses at the following point:
> 
> > at sun.font.SunLayoutEngine.nativeLayout(Native Method)
> > at sun.font.SunLayoutEngine.layout(SunLayoutEngine.java:133)
> > at sun.font.GlyphLayout$EngineRecord.layout(GlyphLayout.java:611)
> > at sun.font.GlyphLayout.layout(GlyphLayout.java:410)
> > at 
> > sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:308)
> > at sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:294)
> > at 
> > sun.font.ExtendedTextSourceLabel.createLogicalBounds(ExtendedTextSourceLabel.java:208)
> > at 
> > sun.font.ExtendedTextSourceLabel.getAdvance(ExtendedTextSourceLabel.java:117)
> > at java.awt.font.TextLine.init(TextLine.java:264)
> > at java.awt.font.TextLine.<init>(TextLine.java:110)
> > at java.awt.font.TextLine.fastCreateTextLine(TextLine.java:952)
> > at java.awt.font.TextLayout.fastInit(TextLayout.java:585)
> > at java.awt.font.TextLayout.<init>(TextLayout.java:374)
> > at 
> > org.apache.fop.render.java2d.Java2DFontMetrics.setFont(Java2DFontMetrics.java:306)
> > at 
> > org.apache.fop.render.java2d.Java2DFontMetrics.hasChar(Java2DFontMetrics.java:360)
> > at 
> > org.apache.fop.render.java2d.FontMetricsMapper.hasChar(FontMetricsMapper.java:175)
> > at org.apache.fop.fonts.Font.hasChar(Font.java:189)
> > at org.apache.fop.fonts.Font.getCharWidth(Font.java:231)
> > at 
> > org.apache.fop.layoutmgr.inline.TextLayoutManager.getNextKnuthElements(TextLayoutManager.java:632)
> > at 
> > org.apache.fop.layoutmgr.inline.LineLayoutManager.collectInlineKnuthElements(LineLayoutManager.java:658)
> > at 
> > org.apache.fop.layoutmgr.inline.LineLayoutManager.getNextKnuthElements(LineLayoutManager.java:593)
> > at 
> > org.apache.fop.layoutmgr.BlockStackingLayoutManager.getNextKnuthElements(BlockStackingLayoutManager.java:284)
> > at 
> > org.apache.fop.layoutmgr.BlockLayoutManager.getNextKnuthElements(BlockLayoutManager.java:113)
> > at 
> > org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:106)
> > at 
> > org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextKnuthElements(PageSequenceLayoutManager.java:272)
> > at 
> > org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:554)
> > at 
> > org.apache.fop.layoutmgr.PageSequenceLayoutManager$PageBreaker.getNextBlockList(PageSequenceLayoutManager.java:264)
> > at 
> > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:301)
> > at 
> > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:263)
> > at 
> > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:157)
> > at 
> > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:385)
> > at 
> > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:148)
> > at 
> > org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:378)
> > at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:194)
> 
> Interestingly when I try this random pausing experiment on Windows XP, 
> it never stops there.  I can't explain that...
> 
> Daniel



Jeremias Maerki


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

Reply via email to