Horrendous start-up time. julia or plots or both?


#1
using Plots

x=1:100
y=[i*i for i in x]

plot(x,y)
gui()

real 0m22.690s
user 0m20.084s
sys 0m1.456s

There’s about 1.5s in there for me to close the plot window.

This is clearly broken behavior. Can somebody suggest what’s going on ?

And if this is a Plots problem, can someone point me to an alternative ?

Thanks


#2

Plots does lazy loading of the backends. A simpler recreation is

using Plots
plotly() # or whatever backend you're using

Generally this doesn’t matter unless you’re opening and closing new sessions often. But yes, Plots.jl has a plan for how to get rid of this in the works. This has to do with conditional dependencies which are getting a massive overhaul pre-1.0.

Gadfly has a startup time issue, so if this is what you’re looking to avoid I would avoid that too. Direct usage of PyPlot, Plotly, or GR are probably your best bets for now if you need to cut the startup times.