Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

User Story #3401 (new)

Opened 10 years ago

Last modified 10 years ago

Images and Image management in java leaks memory

Reported by: jburel Owned by:
Priority: minor Milestone: Unscheduled
Component: Insight Keywords: n.a.
Cc: dzmacdonald, jamoore Story Points: n.a.
Sprint: n.a. Importance: 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 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
measurement tool.

It may also be that the API's which allow the manipulation of
Images may also provide more robust methods for dealing with
affine transforms.


QT: Is very impressive library, but this does not integrate with Swing in MacOsX so we cannot use. JMonkeyEngine: very nice, but has issues with integration with Swing in MacOSX. 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.

Change History (2)

comment:1 Changed 10 years ago by jburel

  • Cc jmoore added

comment:2 Changed 10 years ago by jburel

  • Description modified (diff)
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.207439 sec.)

We're Hiring!