JuliaLang / JuliaLang/PrecompileTools.jl

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

Open
#62 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
249
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior with a LocalPreferences.toml setting precompile_workloads to false and an existing Plots cache, then inspect PrecompileTools.jl and the Preferences.jl integration involved in cache invalidation. Done means changing this preference causes the relevant precompile cache to be invalidated without manually deleting the Plots directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.