xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SANSONE, AARON M [Non-Pharmacia/1000]" <aaron.m.sans...@monsanto.com>
Subject RE: Batik OutOfMemoryError after successive runs...
Date Tue, 16 Apr 2002 16:07:42 GMT
Thierry,

I re-ran my tests with the latest CVS code from the repository.  The results
are only slightly better.  There are still some very large int[] arrays that
are eating up large portions of memory.  The lastest code isn't buying us
much at this point.  It seems that the GVTTreeRenderer thread is hanging on
to all these objects.  I've included the latest OptimizeIT allocation
backtrace for the int[] instances.


Allocation backtraces for class int[]. 
---------------------------------------

Backtrace of code allocating int[]
----------------------------------

7789 instances of int[] allocated.
   63.47% org.apache.batik.swing.gvt.GVTTreeRenderer.run() ()
      49.58% org.apache.batik.gvt.renderer.StaticRenderer.clearOffScreen()
()
         49.58%
org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers() ()
            49.35% org.apache.batik.gvt.renderer.StaticRenderer.renderGNR()
()
               49.35%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering() ()
                  49.0%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D() ()
                     49.0%
org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds() ()
                        49.0%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
                           49.0%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
()
                              49.0%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
                                 49.0%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
()
                                    49.0%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
                                       49.0%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds() ()
                                          49.0%
org.apache.batik.gvt.TextNode.getPrimitiveBounds() ()
                                             49.0%
org.apache.batik.gvt.renderer.BasicTextPainter.getPaintedBounds() ()
                                                49.0%
org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds() ()
                                                   49.0%
org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline() ()
                                                      48.99%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns() ()
                                                         32.89%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextChunk() ()
                                                            16.79%
org.apache.batik.gvt.text.ConcreteTextLayoutFactory.createTextLayout() ()
                                                               16.79%
org.apache.batik.gvt.text.GlyphLayout.GlyphLayout() ()
                                                                  16.79%
org.apache.batik.gvt.font.AWTGVTFont.createGlyphVector() ()
                                                                     16.09%
java.awt.Font.createGlyphVector() (Font.java:1597)
 
16.09% sun.awt.font.StandardGlyphVector.StandardGlyphVector()
(StandardGlyphVector.java:176)
 
16.09% sun.awt.font.NativeFontWrapper.populateGlyphVector()
(NativeFontWrapper.java)
                                                                     0.69%
org.apache.batik.gvt.text.ArabicTextHandler class initialization ()
                                                         16.09%
org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForFontMa
tching() ()
                                                            16.09%
java.text.AttributedString.AttributedString() (AttributedString.java:99)
                                                               16.09%
java.text.AttributedString.AttributedString() (AttributedString.java:213)
                                                                  16.09%
java.text.AttributedString.addAttribute() (AttributedString.java:265)
                                                                     16.09%
java.text.AttributedString.addAttributeImpl() (AttributedString.java:315)
 
16.09% java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
                                                      0.01%
org.apache.batik.gvt.text.GlyphLayout.getOutline() ()
                  0.34%
org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.GraphicsNodeRed8Bit() ()
            0.11% java.awt.image.Raster.createWritableRaster()
(Raster.java:787)
            0.11%
java.awt.image.SinglePixelPackedSampleModel.createCompatibleSampleModel()
(SinglePixelPackedSampleModel.java:196)
      13.89% org.apache.batik.gvt.renderer.StaticRenderer.repaint() ()
   32.27% org.apache.batik.swing.svg.GVTTreeBuilder.run() ()
      32.27% org.apache.batik.bridge.GVTBuilder.build() ()
         32.19% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
            32.19% org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
               32.19% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
                  32.19%
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
                     32.19%
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode() ()
                        16.09%
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString() ()
                           16.09%
org.apache.batik.bridge.SVGTextElementBridge$AttributedStringBuffer.toAttrib
utedString() ()
                              16.09%
java.text.AttributedString.AttributedString() (AttributedString.java:76)
                                 16.09%
java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
                        16.09% java.text.AttributedString.AttributedString()
(AttributedString.java:99)
                           16.09%
java.text.AttributedString.AttributedString() (AttributedString.java:213)
                              16.09%
java.text.AttributedString.addAttribute() (AttributedString.java:265)
                                 16.09%
java.text.AttributedString.addAttributeImpl() (AttributedString.java:315)
                                    16.09%
java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
         0.07% org.apache.batik.bridge.BridgeContext.initializeDocument() ()
   3.15% intuitive.audit.Audit.main() (Audit.java)
   1.09% java.awt.EventDispatchThread.run() (EventDispatchThread.java:84)


 
> I ran this test with the March 11th 1.5 Beta.  The memory 
> issue was not as pronounced as in the 1.1.1 release but still 
> very evident as you can see by the numbers below.  Our 
> corporate firewall won't let me use CVS on the internet, and 
> my home ISP was down all last night and this morning so I am 
> currently unable to get the latest CVS build unless there is 
> a place to download the latest snapshot (i.e like the 
> Cocoon-Dev guys do).  If you can get me the latest build, 
> I'll try it and report my results.
> 
> -Aaron 
> 
> >> We are displaying an image in our Java applet using SVG 
> and the Batik API.
> >> For images with larger SVG Documents we are running out of 
> memory.  For
> >> smaller images, we see a definate memory leak.  We are 
> displaying our SVG
> >> Document in a new frame.  We place some action listeners 
> on the JSVGCanvas
> >> to show status of the document load.  Using OptimizeIT 4.0 I am
> >> able to see
> >> the memory offenders are int[] with 5108 instances and 35643K of
> >> memory, and
> >> 
> org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$AuthorValue
> Entry with
> >> 74140 instances and 2606K of memory.
> >>
> >> Any tips on helping me resolve this issue?  If requested I 
> can forward our
> >> Java Code that Creates a JSVGCanvas and sets the SVGDocument.
> >
> >Can you try with the current cvs code base and tell us if 
> there is some
> >progress.
> >
> >Thierry.
> 

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


Mime
View raw message