NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 1114 - severe performance and memory issues
severe performance and memory issues
Status: CONFIRMED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
Macintosh Mac OS
: P4 normal
Assigned To: ImageJ Bugs Mailing List
: 1184 1186
Depends on:
Blocks:
 
Reported: 2015-07-16 22:59 CDT by Andreas Ettinger
Modified: 2015-11-11 11:15 CST
4 users (show)

See Also:

Description Andreas Ettinger 2015-07-16 22:59:18 CDT
Hi, I experience severe performance issues after a recent update. Fiji slows to a crawl and eventually freezes, even with no data-heavy analysis. 

Specifically, I experienced this when doing the following analysis:
- I am loading microscopy data of typically 80-200 MB stacks, one image stack at a time. 
- I draw ROIs and run a macro to measure fluorescence intensity values in all ROIs to save to a text file.
- I close the image and open the next one for the same analysis. 
- After a few images, Fiji slows significantly.
- Memory used by Fiji (assessed via Mac OS activity monitor) increases quickly with use and was as high as 2.7 GB, even with no image open (Memory allocated to Fiji at the time was 3.5 GB). 
- When adding ROIs, the ROIs appears in the manager with delay or only when I click on the manager.
- When I close Fiji and restart, performance is ok at the beginning, but after a few images it slows down again, concomittant with the described increase in memory use. I wonder if this is caused by an issue with Java heap. 

Additionaly, though not sure if this is a bug:
- Brightness and contrast windows and the channels tool move together with the menu panel. Not a problem, but somewhat annoying.

In general, the current version seems to run slower and image adjustments take more time. 

Thank you for looking into these issues.

Information about your version of Java:

  os.arch => x86_64
  os.name => Mac OS X
  os.version => 10.10.4
  java.version => 1.8.0_31
  java.vendor => Oracle Corporation
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.8.0_31-b13
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 25.31-b07
  java.vm.vendor => Oracle Corporation
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.CGraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.8
  sun.cpu.endian => little
  sun.desktop => null
  file.separator => /

The up-to-date check says: UP_TO_DATE

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home//jre
  imagej.dir => /Users/ucsf/Applications/Fiji.app

Information about the version of each plugin:

Activated update sites:
ImageJ: http://update.imagej.net/ (last check:20150715140840)
Fiji: http://fiji.sc/update/ (last check:20150714092641)

Files not up-to-date:
  ccc2be91 (MODIFIED) 20150716185745 Contents/Info.plist
  ca5a7064 (LOCAL_ONLY) 20150530191602 plugins/Mosaic_ToolSuite/Mosaic_ToolSuite.jar
  e1e481c6 (LOCAL_ONLY) 20150711194120 plugins/multiFitBend2_.py
  62fc0557 (LOCAL_ONLY) 20150712172717 plugins/multiFitBend3_.py
  df703eb4 (LOCAL_ONLY) 20150712172940 plugins/multiFitBend4.txt
  19200071 (LOCAL_ONLY) 20150712210517 plugins/multiFitBend4_.py
  c5a40692 (LOCAL_ONLY) 20150713172914 plugins/multiFitBend5_.py
  9e42853a (LOCAL_ONLY) 20150709183919 plugins/multiFitBend_.py
Comment 1 Radoslaw Ejsmont 2015-11-05 02:50:11 CST
*** Bug 1184 has been marked as a duplicate of this bug. ***
Comment 2 Radoslaw Ejsmont 2015-11-05 02:51:26 CST
I guess as more than 1 user has experienced this it makes it confirmed :)
Comment 3 Radoslaw Ejsmont 2015-11-05 03:00:42 CST
I guess as more than 1 user has experienced this it makes it confirmed :)

I do not know if it helps, but here is the stack trace:

"AWT-EventQueue-0" prio=6 id=15 group=main
   java.lang.Thread.State: WAITING
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.awt.EventQueue.getNextEvent(EventQueue.java:554)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:170)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

"AWT-Shutdown" prio=5 id=12 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:295)
	at java.lang.Thread.run(Thread.java:745)

"AppKit Thread" daemon prio=5 id=11 group=system
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" prio=5 id=27 group=main
   java.lang.Thread.State: RUNNABLE

"Finalizer" daemon prio=8 id=3 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"GC Daemon" daemon prio=2 id=26 group=system
   java.lang.Thread.State: TIMED_WAITING
	at java.lang.Object.wait(Native Method)
	at sun.misc.GC$Daemon.run(GC.java:117)

"Java2D Disposer" daemon prio=10 id=14 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at sun.java2d.Disposer.run(Disposer.java:148)
	at java.lang.Thread.run(Thread.java:745)

"Java2D Queue Flusher" daemon prio=10 id=13 group=system
   java.lang.Thread.State: TIMED_WAITING
	at java.lang.Object.wait(Native Method)
	at sun.java2d.opengl.OGLRenderQueue$QueueFlusher.run(OGLRenderQueue.java:203)

"RMI Reaper" prio=5 id=25 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
	at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
	at sun.rmi.transport.ObjectTable$Reaper.run(ObjectTable.java:351)
	at java.lang.Thread.run(Thread.java:745)

"RMI TCP Accept-0" daemon prio=5 id=24 group=system
   java.lang.Thread.State: RUNNABLE
	at java.net.PlainSocketImpl.socketAccept(Native Method)
	at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:404)
	at java.net.ServerSocket.implAccept(ServerSocket.java:545)
	at java.net.ServerSocket.accept(ServerSocket.java:513)
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:400)
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:372)
	at java.lang.Thread.run(Thread.java:745)

"Reference Handler" daemon prio=10 id=2 group=system
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)

"SciJava-477710de-Thread-2" prio=6 id=95 group=main
   java.lang.Thread.State: RUNNABLE
	at java.lang.Thread.dumpThreads(Native Method)
	at java.lang.Thread.getAllStackTraces(Thread.java:1603)
	at org.scijava.plugins.commands.debug.DumpStack.run(DumpStack.java:80)
	at org.scijava.command.CommandModule.run(CommandModule.java:201)
	at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
	at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
	at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"SciJava-477710de-Thread-3" prio=6 id=96 group=main
   java.lang.Thread.State: TIMED_WAITING
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
	at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:460)
	at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:362)
	at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:941)
	at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1066)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

"Signal Dispatcher" daemon prio=9 id=5 group=system
   java.lang.Thread.State: RUNNABLE

"Timer-0" daemon prio=5 id=18 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at java.util.TimerThread.mainLoop(Timer.java:526)
	at java.util.TimerThread.run(Timer.java:505)

"TimerQueue" daemon prio=5 id=29 group=system
   java.lang.Thread.State: WAITING
	at sun.misc.Unsafe.park(Native Method)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
	at java.util.concurrent.DelayQueue.take(DelayQueue.java:211)
	at javax.swing.TimerQueue.run(TimerQueue.java:171)
	at java.lang.Thread.run(Thread.java:745)

"zSelector" prio=4 id=90 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at ij.gui.StackWindow.run(StackWindow.java:228)
	at java.lang.Thread.run(Thread.java:745)

"zSelector" prio=4 id=89 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at ij.gui.StackWindow.run(StackWindow.java:228)
	at java.lang.Thread.run(Thread.java:745)

"zSelector" prio=4 id=87 group=main
   java.lang.Thread.State: WAITING
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at ij.gui.StackWindow.run(StackWindow.java:228)
	at java.lang.Thread.run(Thread.java:745)

u0078517@gbw-l-m0237 ~ $ ps aux | grep Fiji
USER              PID  %CPU %MEM      VSZ    RSS   TT  STAT STARTED      TIME COMMAND
u0078517        11228   0.0 26.3 13121576 2202100   ??  S     7:23AM   9:48.64 /Applications/Fiji.app/Contents/MacOS/ImageJ-macosx
Comment 4 Curtis Rueden 2015-11-11 08:55:29 CST
*** Bug 1186 has been marked as a duplicate of this bug. ***
Comment 5 Curtis Rueden 2015-11-11 11:15:44 CST
I have done some investigation into this issue, and posted an update on the forum thread. See:

http://forum.imagej.net/t/mac-java-speed-issues/304/4

We think we understand what's causing it now. Next step is to discuss the best approach to fix/workaround the issue.