"Create selection" is extremely slow on a mac

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

"Create selection" is extremely slow on a mac

Thomas Julou
Hello,

While trying to run  on my mac a script written on a unix machine, I realised that the Create Selection command applied to a thresholded image was extremely slow. I tried to benchmark it with the code below, unfortunately it looks like the delay is due to refreshing the gui since the time reported is similar on both machine (≈70ms, even with an intermediate updateDisplay()).

Is it possible that displaying a complex selection on a mac is terribly slow (for my images of interest, 7-10s for a 300x400 image with 50% randomly added to the selection)?
Or can it be a problem with Create Selection itself?

> newImage("Untitled", "32-bit black", 400, 300, 1);
> run("Add Noise");
> setAutoThreshold("Default dark");
> t_start = getTime();
> run("Create Selection");
> // updateDisplay()
> dt = getTime() - t_start;
> print(dt);

Using IJ 2.0.0-rc-34/1.50a with Java 1.7.0_79.
Thank you in advance for you help. Best regards,

Thomas

--
Thomas Julou  |  Computational & Systems Biology  |  Biozentrum – University of Basel  |  Klingelbergstrasse 50/70 CH-4056 Basel  |  +41 (0)61 267 16 21

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: "Create selection" is extremely slow on a mac

Rasband, Wayne (NIH/NIMH) [E]
> On Aug 19, 2015, at 11:54 AM, Thomas Julou <[hidden email]> wrote:
>
> Hello,
>
> While trying to run  on my mac a script written on a unix machine, I realised that the Create Selection command applied to a thresholded image was extremely slow. I tried to benchmark it with the code below, unfortunately it looks like the delay is due to refreshing the gui since the time reported is similar on both machine (≈70ms, even with an intermediate updateDisplay()).
>
> Is it possible that displaying a complex selection on a mac is terribly slow (for my images of interest, 7-10s for a 300x400 image with 50% randomly added to the selection)?
> Or can it be a problem with Create Selection itself?
>
>> newImage("Untitled", "32-bit black", 400, 300, 1);
>> run("Add Noise");
>> setAutoThreshold("Default dark");
>> t_start = getTime();
>> run("Create Selection");
>> // updateDisplay()
>> dt = getTime() - t_start;
>> print(dt);
>
> Using IJ 2.0.0-rc-34/1.50a with Java 1.7.0_79.
> Thank you in advance for you help. Best regards,

On OS X, Java 7 and Java 8, prior to 1.8.0_45, are extremely slow at displaying images. You need to either upgrade to the latest version of Java 8 (1.8.0_51) or revert to Java 6.

-wayne


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