Roadmap for a faster time-to-first-plot?

Hmm. I get much better results with the “package compiled” Plots version:

% julia -J /usr/local/lib/julia/packages/PackageCompiler/CJQcs/sysimg/sys
julia> @time using Plots; gr(); display(plot(randn(10)))
  0.000909 seconds (1.24 k allocations: 61.531 KiB)

julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.6.0)
  CPU: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
  JULIA_DEPOT_PATH = /usr/local/lib/julia:
  JULIA_HISTORY = /Users/jheinen/.julia/logs/repl_history.jl

(v1.3) pkg> st Plots
    Status `/usr/local/lib/julia/environments/v1.3/Project.toml`
  [53c48c17] FixedPointNumbers v0.6.1
  [28b8d3ca] GR v0.46.0 #master (
  [77ba4419] NaNMath v0.3.3
  [ccf2f8ad] PlotThemes v1.0.1
  [995b91a9] PlotUtils v0.6.2 #master (
  [91a5bcdd] Plots v0.28.5 #master (
  [3cdcf5f2] RecipesBase v0.7.0 #master (
  [992d4aef] Showoff v0.3.1 #master (
  [2913bbd2] StatsBase v0.32.0

I use snoop-Plots.jl as a workload for Plots.jl.


If you have trouble with the above workload script (on macOS), you probably have to comment out the StatsPlots test in the end. See note from @ianfiske

Did anything come out of this yet? Any tooling for more precisely identifying why inference/compile-time is slow?

Lots of things. We noticed the Plots.jl time actually goes to around 5 seconds with -O0, so we were underestimating the LLVM time and that means there’s more to do there. It’s somewhat hard to benchmark because the issues now that precompile files have been enhanced are mostly about method invalidation: someone defines a lower dispatch that “infects” that suddenly causes a lot less precompile to be reused. A big issue in CSV.jl was noted to be due to that, and that’s really where all of the profiling seems to lead. Some of that could be fixed by moving some more of these basic dispatches to Base.


Sounds great! Where could I follow the progress or discussions? I didn’t find anything recent.

Come to Boston :slight_smile:! A lot of this is just developing daily. and things get online as they get more concrete.

I’d love to but there are ~6000km and a big ocean in the way. I guess I’ll just have to be patient then :smile: