I’m finding that when I run my code in juno, it takes significantly longer than when run on the terminal. I’m running an optimization routine which gets slower and slower as the evaluations increase (on juno, not terminal). is this to be expected?
No, this is definitely not expected.
Can you share the code you’re running and also how you’re running it in Juno and the REPL respectively?
Also include your versions of the Julia and Atom packages. A while ago (maybe a year?) there was a similar issue that was caused by Atom’s high CPU usage rendering animations, but that should no longer be the case.
Julia v1.0.1, and atom 1.32.2.
Here’s my rather messy code - appreciate this isn’t exactly a minimum working example though…!
I run it on terminal via the “include” command and on atom by running the file (though even if I use" include" command within julia on atom I get the same thing - significantly slower run time.
I think I can reproduce the performance difference in Juno vs a normal REPL. Can you try executing
using Logging; Logging.global_logger(Logging.NullLogger())
before executing the file (both in Juno and the REPL)?
Timings seem to be en par after that for me.
Yes thanks that works well. It’s be bugging me for a while - I should have asked sooner! Do I need to run it everytime I run any code with an optimizer?
Is this tip only applicable to Juno or also to other GUI frontends?
Once per session is enough. I’m not sure what the root cause is, but I think this happens because of a performance problem in Base combined with Juno processing log events.
Depends on the internals of said GUI frontend If there’s nontrivial log event handling going on then it might help, yes. If in doubt, try it.