Will Julia ever fix its "using ..." latency problems?

@Volker_Weissmann DifferentialEquations is a bit unfair, but also getting a lot faster.*

Several plotting packages have sub-sec. startup (but I’m otherwise checking same packages you did/the abstraction plotting packages; what are comparable package/s in Python, i.e. with backends?):

julia> @time using PGFPlotsX
  0.413068 seconds (464.33 k allocations: 29.720 MiB, 10.62% compilation time)

same plotting package you get with Plots.jl, without the abstraction:

julia> @time using GR
  0.815509 seconds (819.21 k allocations: 47.663 MiB, 1.71% gc time, 86.12% compilation time)

There’s been good progress made from 12.7 sec (on your machine), now 70% faster (on my loaded machine, compared to yours):

in 1.9-DEV:

julia> @time using Plots
  3.871938 seconds (5.66 M allocations: 393.934 MiB, 4.29% gc time, 22.05% compilation time: 0% of which was recompilation)

after:
[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
 80.083775 seconds (5.59 M allocations: 389.394 MiB, 0.21% gc time, 1.14% compilation time: 0% of which was recompilation)

vs in 1.7.0:

julia> @time using Plots
  6.400478 seconds (9.10 M allocations: 642.353 MiB, 5.92% gc time, 20.97% compilation time)

[ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]
151.895940 seconds (9.11 M allocations: 643.639 MiB, 0.48% gc time, 1.11% compilation time)

I’m testing Plots.jl since you complained, and to your numbers, but the better package by now seems to be Makie.jl, and there are other simpler with very fast startup.

You can actually get instantaneous startup, I understand, of (these/these?) [plotting] packages, by putting in your sysimage, still showing for 1.7.0 without that:

julia> @time using CairoMakie
  8.230858 seconds (12.80 M allocations: 891.117 MiB, 6.84% gc time, 11.23% compilation time)

julia> @time using AlgebraOfGraphics
  8.557753 seconds (13.31 M allocations: 922.143 MiB, 6.76% gc time, 12.52% compilation time)

[the times do not add up for both of above, you only get extra 0.3 sec for the latter after usinging the former, and I believe you can use them together.]

or if you need 3D/OpenGL other backends:

julia> @time using GLMakie
 10.075012 seconds (14.93 M allocations: 1021.257 MiB, 8.08% gc time, 9.91% compilation time)

julia> @time using RPRMakie
  8.130355 seconds (12.83 M allocations: 892.046 MiB, 6.78% gc time, 10.59% compilation time)

* DifferentialEquations.jl also has 70% faster startup (on 1.7.0) at 10 sec. Maybe not great, but likely the slowest package in the Julia ecosystem to start (but fastest at runtime compares to any other language). Since you compare to Python, and it or no language compares for this, not too helpful to look at the slow (by now tolerable?) startup time. Also use can use it from Python, but since you’re then calling Julia, I assume the startup is the same.

With 1.9 not out, it’s of course not yet supported on 1.9, and it might be also much faster after that upgrade, as Plots.jl did, when this fixed:

julia> @time using DifferentialEquations
[ Info: Precompiling DifferentialEquations [0c46a032-eb83-5123-abaf-570d42b7fbaa]
ERROR: LoadError: Sundials is not properly installed. Please run Pkg.build("Sundials")

[I get actually slightly slower timing for Atom, but it could be my machine, and since Atom is in maintenance mode, VS Code is what’s important now (and is fast for me).]

I realized there’s one minor regression on master where I do not get this (convenient) prompt, unlike on 1.7.0 [EDIT: Issue filed, see next comment]