Re: Macro has slowed down dramatically when run in background

Posted by Brandon Hurr on
URL: http://imagej.273.s1.nabble.com/Macro-has-slowed-down-dramatically-when-run-in-background-tp5013659p5013818.html

I'd like to come back to this email. I am starting to see similar issues
with my machine. When running the macro in the foreground it is
significantly faster than if I switch to my browser, document, texteditor,
or even Activity Monitor and let FIJI run in the background.

I have disabled AppNap as below and it makes no difference.

It seems that people are starting to see this in other programs too,
including Matlab.

https://apple.stackexchange.com/questions/108897/might-mavericks-interfere-with-long-computations
https://discussions.apple.com/thread/6050740?start=0&tstart=0
http://compgroups.net/comp.soft-sys.matlab/matlab-and-app-nap-on-osx-mavericks/2127523

I'm not sure if the Matlab guy actually figured it out or if figure(h) is
related to how images are drawn on OSX in ImageJ.

Does anyone else have any ideas or a way to more rigorously test the
difference and understand what's going on?

Like Sarah, I expect ImageJ to run full tilt until it's finished, not run
at 50% of speed because I'm looking at a text file trying to fix another
macro.

Thanks,
Brandon

On Mon, Jul 20, 2015 at 4:26 PM, Brandon Hurr <[hidden email]>
wrote:

> Try disabling AppNap entirely and run your program:
> From:
> http://hints.macworld.com/article.php?story=20140508050203105
> Open Terminal (Applications/Utilities)
> Copy and Paste:
> defaults write NSGlobalDomain NSAppSleepDisabled -bool YES
> If it doesn't slow down after this then it's AppNap. If it still does then
> there is something else. You are supposed to be able to do this per
> application, but I've not seen how to effectively do it for Java programs
> like ImageJ/FIJI. Perhaps someone else can chime in.
>
> On Mon, Jul 20, 2015 at 16:14 nelssara <[hidden email]> wrote:
>
>> OK:
>>
>>
>> Mac OSX 10.10.4
>>
>> I'm not sure which version of java I am using or how to find that out
>>
>> I'm running FIJI with ImageJ version 2.0.0-rc-30/1.49u
>>
>>
>> And the code is posted above. I don't recieve an error it just runs VERY,
>> VERY slow if I am actively using another program.
>>
>>
>> Thanks for your help!!
>>
>>
>>
>> ________________________________
>> From: Brandon Hurr [via ImageJ] <[hidden email]>
>> Sent: Monday, July 20, 2015 4:54 PM
>> To: Nelson, Sarah
>> Subject: Re: Macro has slowed down dramatically when run in background
>>
>> It is very helpful to supply a minimal reproducible example and your
>> working environment when asking for help on lists and forums.
>> Things that are key for ImageJ would be:
>> Version and type of OS (Windows, Mac, Linux, UNIX)
>> Version of Java
>> Version of ImageJ
>> Minimal reproducible code that causes your error or problem on your system
>> Can you provide those?
>> If you're on a Mac, look up how to disable AppNap for Java.
>>
>> On Mon, Jul 20, 2015 at 15:49 nelssara <[hidden
>> email]</user/SendEmail.jtp?type=node&node=5013663&i=0>> wrote:
>>
>> > Thanks for your response Brandon! I'm not very good with computers, so I
>> > don't exactly know what you are referring to when you mean "conditions".
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://imagej.1557.x6.nabble.com/Macro-has-slowed-down-dramatically-when-run-in-background-tp5013659p5013662.html
>> > Sent from the ImageJ mailing list archive at Nabble.com.
>> >
>> > --
>> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>> >
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://imagej.1557.x6.nabble.com/Macro-has-slowed-down-dramatically-when-run-in-background-tp5013659p5013663.html
>> To unsubscribe from Macro has slowed down dramatically when run in
>> background, click here<
>> >.
>> NAML<
>>
http://imagej.1557.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
>> >
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.x6.nabble.com/Macro-has-slowed-down-dramatically-when-run-in-background-tp5013659p5013664.html
>> Sent from the ImageJ mailing list archive at Nabble.com.
>>
>> --
>> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>>
>

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