Login  Register

Re: imagej and Java 1.8

Posted by Rasband, Wayne (NIH/NIMH) [E] on Dec 06, 2015; 8:16pm
URL: http://imagej.273.s1.nabble.com/imagej-and-Java-1-8-tp5015143p5015152.html

On Dec 6, 2015, at 5:24 AM, Aryeh Weiss <[hidden email]> wrote:
>
> I have noticed that when using Fiji with Java 1.8, the response gradually gets slower, until eventually
> I need to restart Fiji. The issue seems to be connected to screen updates, but I cannot pin it down to a single item, although the ROI Manager seems to often be involved.
> For example, toggling "Show All" in the ROI manager tends to become really slow.

The gradual slowdown of ImageJ with Java 1.8 on OS X appears to be related to setting the menu bar at the top of the screen when image windows are activated. With the ImageJ 1.50e update, the Stack to Images, Window>Tile and Window>Cascade commands, and non-batch mode macros that process multiple images, attempt to minimize setting the menu bar. There is a test macro at

    http://imagej.nih.gov/ij/macros/SetMenuBarBenchmark.txt

which runs much faster on ImageJ 1.50e and later. The latest ImageJ daily build (1.50f16) also reduces the number of times the menu bar is set when switching between windows that have their own menu bar (e.g. “Results" and “Log”) and the “ImageJ" window. The daily build displays a count of the number of times the menu bar has been set when you press the “i” key (Image>Show Info). Note that the "Show Info" command now works even if no image windows are open.

> Now, the memory monitor shows 6.8GB in use, although I have very little open. Double clicking on the Fiji window does not appear to have forced GC.

This looks like a memory leak. Clicking in the ImageJ status bar, or in the Memory Monitor window, runs the Java garbage collector, which reclaims unused memory unless there is a memory leak. Sometimes you need to click several times to reclaim all unused memory. Memory leaks can also cause ImageJ to slowdown. Do you see the memory leak when using Java 1.6? It would be very helpful if you could figure out which plugin is causing the memory leak.

> I am just adding this update in the hope that these observations may prove useful to the people who know more about Fiji and Java 1.8 than I. If there are addition things that I can do to provide useful data for this, please let me know.



--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html