[OpenJDK 2D-Dev] sun.java2D.pisces big memory usage (waste ?) (original) (raw)
Laurent Bourgès bourges.laurent at gmail.com
Fri Mar 22 10:56:19 UTC 2013
- Previous message: [OpenJDK 2D-Dev] How to use D3DRTTSurfaceToSurfaceBlit
- Next message: [OpenJDK 2D-Dev] Fwd: sun.java2D.pisces big memory usage (waste ?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear all,
I recently profiled my swing application (Aspro2: http://www.jmmc.fr/aspro) using the netbeans profiler (OpenJDK8 / linux x64) and in contrary to Oracle JDK, it consumes a lot of memory in sun.java2D.pisces code as int[] or float[] arrays:
- Helpers.widenArray : 25Mb
- Renderer: 75 Mb (from AAShapePipe.draw)
Here are few profiler screenshots: http://jmmc.fr/~bourgesl/share/pisces2D/
Aspro2 screenshot illustrating the plot that consumes a lot of memory: http://jmmc.fr/~bourgesl/share/pisces2D/Capture-Aspro2.png
My application uses jfreechart that calls graphics2D.draw(shape) where shape is always a rectangle / line with antialiasing enabled.
Several questions:
- Why is the antialiasing performed in java code ? I mean is it possible to use OpenGL or XRender pipelines to perform such tasks ?
- Is there some docs explaining the java2D code and the different implementations (openjdk, oracle, xrender, opengl ...) ?
- how could I help improving that code (Renderer ...) to avoid so many array allocations / resizing (array sizing or using a thread context object to reuse allocated int[] / float[] arrays) ?
Does somebody work on that topic ? has some ideas to optimize that code (pisces) ?
Regards, Laurent -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20130322/a112d713/attachment.html>
- Previous message: [OpenJDK 2D-Dev] How to use D3DRTTSurfaceToSurfaceBlit
- Next message: [OpenJDK 2D-Dev] Fwd: sun.java2D.pisces big memory usage (waste ?)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]