-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sysimage with Plots.jl
compiled is slow in Atom/Juno IDE
#352
Comments
I have a similar problem. When Revise.jl is loaded in my startup file (without Atom), plotting is slow. Does Atom by default load Revise.jl? I tried |
@hhaensel have you tried doing the following: in Atom , go to Juno settings, search for the option to add julia startup arguments and add something like: --trace-compile="/home/me/extracompilestmts.jl",--sysimage=mysysimage_withPlots.so restart Atom, open the repl in atom and use generate some plots. Go to your home directory and copy the file "extracompilestmts.jl" somewhere else, now you can close Atom. Now all that is left to do is run julia with the Plots sysimage: and inside the repl run: using PackageCompiler
create_sysimage([:Atom,:Juno], sysimage_path="sys_atom_plots.so", precompile_statements_file="extracompilestmts.jl") then modify the atom startup in order to use this new sysimage i used this trick not on a sysimage with Plots, but on a sysimage with DataFrames and CSV, and in this way i recovered the speed that this custom sysimage had on a terminal inside Atom. i do not believe that this problem is a PackageCompiler problem... |
On Ubuntu I cannot reproduce that every call is slow, just the first one.
Following the steps provided by @francescoalemanno (thanks!), the timings change to
Beware: when specifing the trace file in juno I also show the header to show that there is warning from Juno now. I hope that this doesn't cause any trouble. |
This may be because Juno loads specific versions of some dependencies, meaning that if Juno and Plots have a common dependency, Plots have some of the code it was relying on invalidated. Does the slowdown also happen when you compile the sysimage from within Atom? |
yes |
I've created two gists that may resolve this issue based on @francescoalemanno 's comment |
Note that you actually omitted the key step that @francescoalemanno came up with.
You might actually get an even bigger speed-up with that. See my timings above (for Ubuntu). |
Ah ... yes I knew, you're right. Here is the result I adopt the below :
I admit the performance is better than my approach
However, it requires manual operation (e.g. open Atom and add argument something) which is a bit annoying for me. |
I don't think there is anything to do here from PackageCompiler's p.o.v. As shown in #352 (comment) it seems very possible to get a good Plots.jl first time even in Atom. |
When using a sysimage with
Plots.jl
compiled as described in the new docs, the display of plots in Atom/Juno is slow.While the timing of both loading
using Plots
and plotting is nominally fast as expected according to@time
, it takes approx. 2 seconds for the plot to appear.When modifying the call to
The plot appears immediately, but the prompt only returns after 2 seconds delay.
In a standalone REPL this problem does not appear.
The issue has been reproduced on two different Windows 10, 64-bit machines. According to @KristofferC (see #337), the problem does not occur on a Mac.
my machine:
Windows 10 64bit
Atom 1.44.0
julia-client 0.12.2
The text was updated successfully, but these errors were encountered: