Thierry,
I ran the sequence again and set the
JSVGCanvas.setDocumentState(JSVGComponent.ALWAYS_DYNAMIC). I didn't notice
any difference. Here is my backtrace. I don't know that the percentage
numbers are apples to apples since the total memory usage was different this
time. However I did observe the same increase of the int[] arrays on each
subsequent rendering of the image.
Allocation backtraces for class int[].
--------------------------------------
Backtrace of code allocating int[]
----------------------------------
6797 instances of int[] allocated.
57.48% org.apache.batik.swing.gvt.GVTTreeRenderer.run() ()
57.33% org.apache.batik.gvt.renderer.StaticRenderer.clearOffScreen()
()
57.33%
org.apache.batik.gvt.renderer.StaticRenderer.updateWorkingBuffers() ()
56.95% org.apache.batik.gvt.renderer.StaticRenderer.renderGNR()
()
56.95%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.createRendering() ()
56.51%
org.apache.batik.gvt.filter.GraphicsNodeRable8Bit.getBounds2D() ()
56.51%
org.apache.batik.gvt.CompositeGraphicsNode.getPrimitiveBounds() ()
56.51%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
56.51%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
()
56.51%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
56.51%
org.apache.batik.gvt.CompositeGraphicsNode.getTransformedPrimitiveBounds()
()
56.51%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedBounds() ()
56.51%
org.apache.batik.gvt.AbstractGraphicsNode.getTransformedPrimitiveBounds() ()
56.51%
org.apache.batik.gvt.TextNode.getPrimitiveBounds() ()
56.51%
org.apache.batik.gvt.renderer.BasicTextPainter.getPaintedBounds() ()
56.51%
org.apache.batik.gvt.renderer.StrokingTextPainter.getBounds() ()
56.51%
org.apache.batik.gvt.renderer.StrokingTextPainter.getOutline() ()
56.49%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextRuns() ()
37.92%
org.apache.batik.gvt.renderer.StrokingTextPainter.getTextChunk() ()
19.36%
org.apache.batik.gvt.text.ConcreteTextLayoutFactory.createTextLayout() ()
19.36%
org.apache.batik.gvt.text.GlyphLayout.GlyphLayout() ()
19.36%
org.apache.batik.gvt.font.AWTGVTFont.createGlyphVector() ()
18.56%
java.awt.Font.createGlyphVector() (Font.java:1597)
18.56% sun.awt.font.StandardGlyphVector.StandardGlyphVector()
(StandardGlyphVector.java:176)
18.56% sun.awt.font.NativeFontWrapper.populateGlyphVector()
(NativeFontWrapper.java)
0.79%
org.apache.batik.gvt.text.ArabicTextHandler class initialization ()
18.56%
org.apache.batik.gvt.renderer.StrokingTextPainter.createModifiedACIForFontMa
tching() ()
18.56%
java.text.AttributedString.AttributedString() (AttributedString.java:99)
18.56%
java.text.AttributedString.AttributedString() (AttributedString.java:213)
18.56%
java.text.AttributedString.addAttribute() (AttributedString.java:265)
18.56%
java.text.AttributedString.addAttributeImpl() (AttributedString.java:315)
18.56% java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
0.01%
org.apache.batik.gvt.text.GlyphLayout.getOutline() ()
0.44%
org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.GraphicsNodeRed8Bit() ()
0.17% java.awt.image.Raster.createWritableRaster()
(Raster.java:787)
0.17%
java.awt.image.SinglePixelPackedSampleModel.createCompatibleSampleModel()
(SinglePixelPackedSampleModel.java:196)
0.02%
sun.awt.image.IntegerInterleavedRaster.createWritableChild()
(IntegerInterleavedRaster.java:411)
0.14% org.apache.batik.gvt.renderer.StaticRenderer.repaint() ()
37.25% org.apache.batik.swing.svg.GVTTreeBuilder.run() ()
37.25% org.apache.batik.bridge.GVTBuilder.build() ()
37.13% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
37.13% org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
37.13% org.apache.batik.bridge.GVTBuilder.buildComposite() ()
37.13%
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode() ()
37.13%
org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode() ()
18.56%
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString() ()
18.56%
org.apache.batik.bridge.SVGTextElementBridge$AttributedStringBuffer.toAttrib
utedString() ()
18.56%
java.text.AttributedString.AttributedString() (AttributedString.java:76)
18.56%
java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
18.56% java.text.AttributedString.AttributedString()
(AttributedString.java:99)
18.56%
java.text.AttributedString.AttributedString() (AttributedString.java:213)
18.56%
java.text.AttributedString.addAttribute() (AttributedString.java:265)
18.56%
java.text.AttributedString.addAttributeImpl() (AttributedString.java:315)
18.56%
java.text.AttributedString.createRunAttributeDataVectors()
(AttributedString.java:327)
0.11% org.apache.batik.bridge.BridgeContext.initializeDocument() ()
3.61% intuitive.audit.Audit.main() (Audit.java)
1.45% java.awt.EventDispatchThread.run() (EventDispatchThread.java:84)
0.16% org.apache.batik.swing.svg.SVGLoadEventDispatcher.run() ()
0.02% java.lang.Thread.run() (Thread.java:484)
>> 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.
>
>Can you tell us if you invoke the
>setDocumentState(JSVGComponent.ALWAYS_DYNAMIC) method helps you, what kind
>of difference you see.
>
>That will help us to quantify the memory consumption.
>
>Thierry.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]