Tracking down slowness of using

This is the speed I get with a clean .julia profile:

julia> @time using HTTP
  0.185504 seconds (50.50 k allocations: 4.633 MiB, 85.81% compilation time)

With non-default options I can get down to:

julia> @time using HTTP
  0.088289 seconds (58.23 k allocations: 5.123 MiB, 54.43% compilation time)

but with the .julia folder I had I get:

$ ~/julia-1.7.0/bin/julia --startup-file=no
(@v1.7) pkg> up
julia> @time using HTTP
  0.219551 seconds (113.09 k allocations: 7.679 MiB, 74.00% compilation time)

It’s not bad, but slower (and more allocations). I suspect it might be because the dependencies are not at the same version, so is there a quick way to check or to ensure at all at latest version? What else could it be?

I’m looking into timings for plotting for VegaLite and such as:

julia> @time using CMPlot
 11.171665 seconds (20.99 M allocations: 975.639 MiB, 5.90% gc time, 68.34% compilation time)

why I can’t get closer to (or better) than the non-default:

$ ~/julia-1.7.0/bin/julia --startup-file=no -O1 --compile=min

julia> @time using CMPlot
  3.903260 seconds (5.58 M allocations: 363.342 MiB, 4.74% gc time, 2.68% compilation time)

And for:

julia> @time using VegaLite
  1.494110 seconds (1.70 M allocations: 106.578 MiB, 1.89% gc time, 57.60% compilation time)

non-default:
julia> @time using VegaLite
  0.716827 seconds (1.14 M allocations: 76.784 MiB, 1.83% gc time, 7.65% compilation time)

The timing for this one is pretty bad:

julia> @time using ModiaPlot_GLMakie
 13.322823 seconds (19.92 M allocations: 1.279 GiB, 5.72% gc time, 13.36% compilation time)

even with:
$ ~/julia-1.7.0/bin/julia --startup-file=no -O0 --compile=min

julia> @time using ModiaPlot_GLMakie
 11.789193 seconds (18.64 M allocations: 1.209 GiB, 6.95% gc time, 2.08% compilation time)

I suppose in all these cases a system image is the way to go, but I’m looking into if the default experience can be improved for people.