Skip to content

Loading packages is significantly slower on recent master than on 1.9 beta and 1.8 #48811

Closed
@bvdmitri

Description

@bvdmitri

I'm not sure if this is something known, but I noticed quite a noticable regression on the recent master (built from source today). Julia 1.9-beta includes an awesome feature that precompiles packages better, thus reducing load times. For packages such as Plots and CairoMakie I observe almost twice faster startup times on my machine. This improvement, however, is no longer present on the recent master.

time julia +release --startup-file=no -e 'import CairoMakie'
julia +release --startup-file=no -e 'import CairoMakie'  12.46s user 1.86s system 117% cpu 12.209 total

time julia +1.9 --startup-file=no -e 'import CairoMakie'
julia +1.9 --startup-file=no -e 'import CairoMakie'  6.86s user 1.38s system 128% cpu 6.393 total

time ./julia --startup-file=no -e 'import CairoMakie'
./julia --startup-file=no -e 'import CairoMakie'  14.99s user 0.67s system 109% cpu 14.323 total

Here ./julia is the compiled master binary.
The loading time of CairoMakie is actually even slower than on the current release.

Same is happening for the Plots

time julia +release --startup-file=no -e 'import Plots'
julia +release --startup-file=no -e 'import Plots'  3.00s user 2.10s system 185% cpu 2.755 total

time julia +1.9 --startup-file=no -e 'import Plots'
julia +1.9 --startup-file=no -e 'import Plots'  2.21s user 2.08s system 219% cpu 1.952 total

time ./julia --startup-file=no -e 'import Plots'
./julia --startup-file=no -e 'import Plots'  3.11s user 0.53s system 157% cpu 2.313 total

I executed each command at least 3-4 times, just to ensure everything is precompiled. The pattern repeats, the master is always slower than 1.8 and 1.9-beta.

These are timings with some "workload":

time julia +release --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'
julia +release --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'  17.58s user 2.06s system 112% cpu 17.458 total

time julia +1.9 --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'
julia +1.9 --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'  6.66s user 2.14s system 136% cpu 6.453 total

time ./julia --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'
./julia --startup-file=no -e 'import CairoMakie; CairoMakie.plot(1:5)'  15.43s user 0.79s system 108% cpu 14.896 total

time julia +release --startup-file=no -e 'import Plots; Plots.plot(1:5)'
julia +release --startup-file=no -e 'import Plots; Plots.plot(1:5)'  3.54s user 2.10s system 170% cpu 3.305 total

time julia +1.9 --startup-file=no -e 'import Plots; Plots.plot(1:5)'
julia +1.9 --startup-file=no -e 'import Plots; Plots.plot(1:5)'  2.21s user 2.16s system 219% cpu 1.989 total

time ./julia --startup-file=no -e 'import Plots; Plots.plot(1:5)'
./julia --startup-file=no -e 'import Plots; Plots.plot(1:5)'  3.00s user 0.66s system 156% cpu 2.333 total

With some workload timings for the master are better than on 1.8, but still worse than on the 1.9-beta (especially for CairoMakie).

versions:

+release installed from juliaup

julia> versioninfo()
Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 6 virtual cores

+1.9 installed from juliaup

julia> versioninfo()
Julia Version 1.9.0-beta4
Commit b75ddb787ff (2023-02-07 21:53 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.5.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 6 virtual cores

master built from source with just git clone & make. No special configuration.

julia> versioninfo()
Julia Version 1.10.0-DEV.664
Commit bfacf2cdf9 (2023-02-27 08:30 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin22.3.0)
  CPU: 10 × Apple M2 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 1 on 6 virtual cores

Metadata

Metadata

Assignees

No one assigned

    Labels

    latencyLatencyregressionRegression in behavior compared to a previous version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions