Closed Datseris closed 6 years ago
Is it several minutes even after precompiling? On my machine (Mac) it takes 53 seconds, which is far worse than in 0.6, but it seems to be partly a Julia issue — see JuliaLang/julia#27861.
In my machine it takes
julia> @time using PyPlot
┌ Warning: `convert(::Type{VersionNumber}, v::AbstractString)` is deprecated, use `VersionNumber(v)` instead.
│ caller = __init__() at init.jl:178
└ @ PyPlot init.jl:178
173.899786 seconds (193.56 M allocations: 11.314 GiB, 10.52% gc time)
(notice that there are still depwarnings)
I am not running this on a super-computer but it is still a decent machine, so I wouldn't expect something so low... but you pointed at the main Julia repo so probably it is not exclusive to PyPlot.
julia> @time using PyPlot 26.616278 seconds (40.97 M allocations: 2.169 GiB, 3.27% gc time)
This is on a Macbook Air, running Linux, and PyPlot master.
After updating to master branch and recompiling, closing Julia and then
julia> @time using PyPlot
179.559343 seconds (191.33 M allocations: 11.238 GiB, 2.01% gc time)
I don't know how mcreel gets these numbers...
Did you update to the master branch of Julia or of PyPlot? In particular Julia master is now much improved. Nevertheless the load time on my computer is still more than twice with Julia 0.7 than in was with Julia 0.6, see: https://github.com/JuliaLang/julia/issues/27861
I'm using julia Version 0.7.0-beta.0, which I obtained by git clone and checking out that version. It's compiled on my machine. PyPlot is from master. I'm hoping that the time drops considerably more as the julia 1.0 ecosystem starts to stabilize!
After beta.0 there have been already two fixes that helped a lot.
Compiling now, will report back.
Here are the current results, a little better using Julia master as of now. The previous time, I had fixed the deprecation warning, I recall now.
julia> @time using PyPlot
┌ Warning: convert(::Type{VersionNumber}, v::AbstractString)
is deprecated, use VersionNumber(v)
instead.
│ caller = init() at init.jl:178
└ @ PyPlot init.jl:178
22.735591 seconds (42.98 M allocations: 2.345 GiB, 3.66% gc time)
julia>
Starting julia with "julia --depwarn=no" should give you a slightly better startup time. Still not good, though.
Issue is more than fixed on Julia master. Load time now about 20% faster than on 0.63! :) see: JuliaLang/julia#27861
Cool, nightlies for windows are still 6 days old master, so I can't test (I don't know how to compile from scratch). Will test once nightlies are updated.
EDIT: the package has still deprecation warnings by the way, which do slow things down:
┌ Warning: Deprecated syntax `try without catch or finally` at C:\Users\datseris\.julia\packages\PyPlot\16Fy\src\PyPlot.jl:285.
└ @ PyPlot.jl:285
WARNING: importing deprecated binding Base.connect into PyPlot.
WARNING: Base.connect is deprecated: it has been moved to the standard library package `Sockets`.
Add `using Sockets` to your imports.
likely near C:\Users\datseris\.julia\packages\PyPlot\16Fy\src\PyPlot.jl:187
┌ Warning: `convert(::Type{VersionNumber}, v::AbstractString)` is deprecated, use `VersionNumber(v)` instead.
│ caller = __init__() at init.jl:178
└ @ PyPlot init.jl:178
@Datseris, the deprecations are fixed on master. In general, to use 0.7-beta, you currently need master
versions of many packages.
Thanks Steven, everything is fast as lightning now (at current master - I am guessing metadata isn't merged because I Can't update to a 2.6 version).
I am sure that this has been noticed but I couldn't see any issue for it so I am opening one.
In Julia 0.7beta and PyPlot 2.5 doing
using PyPlot
takes several minutes: I have timed it to 3-4 minutes give or take. This is significantly slower than what happens on Julia 0.6.This is on Windows 10.