User Story #3401 (new)
Images and Image management in java leaks memory
|Reported by:||jburel||Owned by:|
|Cc:||dzmacdonald, jamoore||Story Points:||n.a.|
|Total Remaining Time:||n.a.||Estimated Remaining Time:||n.a.|
Description (last modified by jburel)
It has been seen for some time that insight has been running out of memory when manipulating images.
It has been especially noticeable in the Lens, where zooming of
the image can result in insight running out of ram http://trac.openmicroscopy.org.uk/shoola/ticket/773. This is
due to a bug in the scaling operations in Java using excessive
amounts of ram for the scaling operation and it affects all
operations for scaling.
It has also been shown that Java holds on to references of
Databuffers in BufferedImages.
This means that Insight needs to find new methods for manipulating
images, Factories, caching?
To this effect we are investigating different API's available to
store, display, manipulate images.
It has also been seen that the Java2D API has bugs when shapes
undergo Affine Transforms, this has led to a major bug in the
It may also be that the API's which allow the manipulation of
Images may also provide more robust methods for dealing with
QT: Is very impressive library, but this does not integrate with Swing in MacOsX so we cannot use. http://labs.trolltech.com/page/Projects/QtJambi/QtJambiAwtBridge JMonkeyEngine: very nice, but has issues with integration with Swing in MacOSX. http://www.jmonkeyengine.com/jmeforum/index.php?topic=7604.15 JavaFX: Not fast, nor well integrated into JAva Applications, closer to scripting engine. Not impressive. VTK: seems very good, integration issues with Swing, deployment issues. Xith3D: seems to be less maintained, issues with integration with Swing.
Metrics on Jogl vs Java2D
Some metrics comparing Java2D and JoGL. These metrics are the mean time for retrieval and display over a 1000 planes.
re.renderAsPackedInt(Mean Retrieval Time(ms)): 73
create BufferedImage and render(Mean Time(ms)): 24
Total Time from retrieval to display(Mean Time(ms)): 97
re.renderAsPackedIntAsRGBA(Mean Retrieval Time(ms)): 73
createTexture and render(Mean Time(ms)): 0
Total Time from retrieval to display(Mean Time(ms)): 73
JoGL due to the removal of the BufferedImage is effectively 30% faster than Java2D.