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 Batik OutOfMemoryError after successive runs...
Date Mon, 15 Apr 2002 18:35:03 GMT
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$AuthorValueEntry 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.

I've included the OptimizeIT Allocation Backtraces for anyone who is
interested.

-Thanks,
Aaron


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

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

2287 instances of int[] allocated.
   68.16% org.apache.batik.swing.gvt.GVTTreeRenderer.run()
      59.86% org.apache.batik.gvt.renderer.StaticRenderer.clearOffScreen()
         59.86%
org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers()
            59.33% org.apache.batik.gvt.renderer.StaticRenderer.renderGNR()
               59.33%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering()
                  58.28%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D()
                     58.28%
org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds()
                        58.28%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds()
                           58.28%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
                              58.28%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds()
                                 58.28%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
                                    58.28%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds()
                                       58.28%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds()
                                          58.28%
org.apache.batik.gvt.TextNode.getPrimitiveBounds()
                                             58.28%
org.apache.batik.gvt.renderer.BasicTextPainter.getPaintedBounds()
                                                58.28%
org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds()
                                                   58.28%
org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline()
                                                      58.24%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns()
                                                         * 39.61%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextChunk()
                                                            20.98%
org.apache.batik.gvt.text.ConcreteTextLayoutFactory.createTextLayout()
                                                               20.98%
org.apache.batik.gvt.text.GlyphLayout.GlyphLayout()
                                                                  20.98%
org.apache.batik.gvt.font.AWTGVTFont.createGlyphVector()
                                                                     18.62%
java.awt.Font.createGlyphVector() (starting in Font.java:1597)
 
18.62% sun.awt.font.StandardGlyphVector.StandardGlyphVector() (starting in
StandardGlyphVector.java:163)
                                                                           *
18.62% sun.awt.font.NativeFontWrapper.populateGlyphVector() (implemented in
NativeFontWrapper.java)
                                                                    * 2.36%
org.apache.batik.gvt.text.ArabicTextHandler class initialization
                                                         18.62%
org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForFontMa
tching()
                                                            18.62%
java.text.AttributedString.AttributedString() (starting in
AttributedString.java:99)
                                                               18.62%
java.text.AttributedString.AttributedString() (starting in
AttributedString.java:148)
                                                                  18.62%
java.text.AttributedString.addAttribute() (starting in
AttributedString.java:257)
                                                                     18.62%
java.text.AttributedString.addAttributeImpl() (starting in
AttributedString.java:314)
                                                                        *
18.62% java.text.AttributedString.createRunAttributeDataVectors() (starting
in AttributedString.java:327)
                                                      0.04%
org.apache.batik.gvt.text.GlyphLayout.getOutline()
                  1.04%
org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.GraphicsNodeRed8Bit()
            0.26%
java.awt.image.SinglePixelPackedSampleModel.createCompatibleSampleModel()
(starting in SinglePixelPackedSampleModel.java:196)
            0.26% java.awt.image.Raster.createWritableRaster() (starting in
Raster.java:783)
      8.3% org.apache.batik.gvt.renderer.StaticRenderer.repaint()
         8.3% org.apache.batik.gvt.renderer.StaticRenderer.repaint()
            8.13% org.apache.batik.ext.awt.image.rendered.PadRed.copyData()
               8.13%
org.apache.batik.ext.awt.image.rendered.TranslateRed.copyData()
                  8.13%
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyData()
                     8.13%
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.copyToRasterByBlock
s()
                        8.04%
org.apache.batik.ext.awt.image.rendered.AbstractRed.makeTile()
                           7.08%
java.awt.image.Raster.createWritableRaster() (starting in Raster.java:783)
                              4.72%
java.awt.image.SinglePixelPackedSampleModel.createDataBuffer() (starting in
SinglePixelPackedSampleModel.java:208)
                                 4.72%
java.awt.image.DataBufferInt.DataBufferInt() (starting in
DataBufferInt.java:43)
                                    2.36%
java.awt.image.DataBuffer.DataBuffer() (starting in DataBuffer.java:109)
                              2.36%
java.awt.image.Raster.createWritableRaster() (starting in Raster.java:806)
                           0.96%
sun.awt.image.IntegerInterleavedRaster.createWritableChild() (starting in
IntegerInterleavedRaster.java:388)
                        0.08%
org.apache.batik.ext.awt.image.rendered.AbstractTiledRed.drawBlock()
            0.17%
org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers()
   18.62% org.apache.batik.swing.svg.GVTTreeBuilder.run()
      18.62% org.apache.batik.bridge.GVTBuilder.build()
         18.62% org.apache.batik.bridge.GVTBuilder.buildComposite()
            18.62% org.apache.batik.bridge.GVTBuilder.buildGraphicsNode()
               18.62% org.apache.batik.bridge.GVTBuilder.buildComposite()
                  18.62%
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode()
                     18.62%
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode()
                        18.62%
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString()
                           18.62%
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedStrings()
                              18.62%
org.apache.batik.bridge.SVGTextElementBridge.createAttributedString()
                                 18.62%
java.text.AttributedString.AttributedString() (starting in
AttributedString.java:62)
                                    * 18.62%
java.text.AttributedString.createRunAttributeDataVectors() (starting in
AttributedString.java:327)
   10.75% intuitive.audit.Audit.main() (implemented in Audit.java)
   2.44% java.awt.EventDispatchThread.run() (starting in
EventDispatchThread.java:84)


Allocation backtraces for class
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$AuthorValueEntry. 
----------------------------------------------------------------------------
-------------------------

Backtrace of code allocating
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$AuthorValueEntry
----------------------------------------------------------------------------
--------------------

24708 instances of
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$AuthorValueEntry
allocated.
   100.0% org.apache.batik.swing.svg.GVTTreeBuilder.run() ()
      100.0% org.apache.batik.bridge.GVTBuilder.build() ()
         99.76% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
            99.76% org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
               98.82% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
                  98.82%
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
                     98.82%
org.apache.batik.bridge.CSSUtilities.convertDisplay() ()
                        98.82%
org.apache.batik.bridge.CSSUtilities.getComputedStyle() ()
                           98.82%
org.apache.batik.css.AbstractViewCSS.getComputedStyleInternal() ()
                              98.82%
org.apache.batik.css.AbstractViewCSS.computeStyle() ()
                                 98.82%
org.apache.batik.css.AbstractViewCSS.computeRelativeValues() ()
                                    98.82%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.setPropertyCSSValue() ()
                                       98.82%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$PropertyMap.put() ()
                                          98.82%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.createValueEntry() ()
               0.93% org.apache.batik.bridge.CSSUtilities.convertDisplay()
()
                  0.93%
org.apache.batik.bridge.CSSUtilities.getComputedStyle() ()
                     0.93%
org.apache.batik.css.AbstractViewCSS.getComputedStyleInternal() ()
                        0.93%
org.apache.batik.css.AbstractViewCSS.computeStyle() ()
                           0.88%
org.apache.batik.css.AbstractViewCSS.computeRelativeValues() ()
                              0.88%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.setPropertyCSSValue() ()
                                 0.88%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$PropertyMap.put() ()
                                    0.88%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.createValueEntry() ()
                           0.05%
org.apache.batik.css.AbstractViewCSS.getCascadedStyle() ()
                              0.04%
org.apache.batik.css.AbstractViewCSS.addNonCSSPresentationalHints() ()
                                 0.04%
org.apache.batik.css.AbstractViewCSS.setAuthorProperty() ()
                                    0.04%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.setPropertyCSSValue() ()
                                       0.04%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$PropertyMap.put() ()
                                          0.04%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.createValueEntry() ()
                              0.01%
org.apache.batik.css.AbstractViewCSS.addInlineStyleProperties() ()
                                 0.01%
org.apache.batik.css.AbstractViewCSS.setAuthorProperty() ()
                                    0.01%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.setPropertyCSSValue() ()
                                       0.01%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$PropertyMap.put() ()
                                          0.01%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.createValueEntry() ()
         0.23%
org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode() ()
            0.23% org.apache.batik.bridge.CSSUtilities.convertVisibility()
()
               0.23% org.apache.batik.bridge.CSSUtilities.getComputedStyle()
()
                  0.23%
org.apache.batik.css.AbstractViewCSS.getComputedStyleInternal() ()
                     0.23%
org.apache.batik.css.AbstractViewCSS.computeStyle() ()
                        0.23%
org.apache.batik.css.AbstractViewCSS.computeRelativeValues() ()
                           0.23%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.setPropertyCSSValue() ()
                              0.23%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration$PropertyMap.put() ()
                                 0.23%
org.apache.batik.css.CSSOMReadOnlyStyleDeclaration.createValueEntry() ()

---------------------------------------------------------------------
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