PrecompileTools.jl icon indicating copy to clipboard operation
PrecompileTools.jl copied to clipboard

Disabling PrecompileTools via `LocalPreferences.toml` doesn't seem to invalidate the cachefile

Open KristofferC opened this issue 7 months ago • 1 comments

If I create a LocalPreferences.toml with

[PrecompileTools]
precompile_workloads = false

but I have a valid precompile file for Plots, it doesn't seem to take effect:

julia> using Plots

# Still fast TTFP
julia> @time @eval (p = Plots.plot(rand(10), rand(10)); display(p))
  0.347988 seconds (103.73 k allocations: 7.204 MiB, 7.12% gc time, 34.45% compilation time: 26% of which was recompilation)

Now I delete the .julia/compiled/v.1.10/Plots folder:

julia> using Plots
Precompiling Plots finished.
  2 dependencies successfully precompiled in 5 seconds. 150 already precompiled.

# Slow TTFP, preference file is now in effect
julia> @time @eval (p = Plots.plot(rand(10), rand(10)); display(p))
  3.473250 seconds (20.39 M allocations: 1.374 GiB, 6.21% gc time, 93.22% compilation time: <1% of which was recompilation

Maybe this issue is better suited in Preferences.jl but I was off the impression that preferences used during precompile time should invalidate the precompile file if they changed.

cc @staticfloat, @timholy

KristofferC avatar May 16 '25 15:05 KristofferC

I suspect this is more of an issue for Preferences.jl, but I'll take a look soon.

timholy avatar May 16 '25 16:05 timholy