Startup time of 1000 packages
I think startup time is a big deal for Julia, especially for new users. If it takes a long time to load a package, it makes Julia look bad.
Recently, Julia 1.12 beta was released, and I noticed that the load times are higher than before. Talking to other package developers, this seemed like a shared experience, so I wrote a script to measure the install, precompile and load times of the 1000 most downloaded packages.
Dashboard
To visualize the results, I wrote a Pluto notebook (obviously ), you can read it online here and play with the parameters yourself.
Here is a screenshot of the notebook, click to go to the interactive version:
No complete TTFX measurement
Unfortunately, these numbers do not tell the complete story, since it does not measure JIT compilation. This happens when using packages for the first time, e.g. the first time you call Plots.plot(data)
. To measure this, we would need a “representative workflow” for every package.
My take
In my view, package latency has gone up significantly in the last two Julia versions. The average time to install, precompile and load an environment with a popular package is:
- 37% slower in Julia 1.11 compared to Julia 1.10
- 53% slower in Julia 1.12 compared to Julia 1.10
This is the time it takes to install, (parallel) precompile and import
a package, plus its dependencies, on a fresh installation of Julia. Average taken over the 1000 most downloaded packages.
My analysis takes installation and precompilation (let’s call this ‘setup’) into account, which not all TTFX discussions do. I believe that setup time is very important for new users, who might face setup times more often (trying new packages), and who might find it most surprising (coming from another ecosystem like Python or Matlab).
Your take
I am curious to hear what you think of the results! Be sure to play with the parameters in the notebook, edit the code, or run your own benchmarks.
Source code & data
The script to measure the package loading times is available here:
https://github.com/fonsp/package-loading-times
You can find the measurements as
.json
files here:https://github.com/fonsp/package-loading-times/tree/results-v1
You can also get code to load the data from my notebook, see the dashboard for source.