EDIT: SnoopPrecompile has been replaced by PrecompileTools. It also has a different mechanism for disabling precompile workloads, see its documentation.
The latest version of SnoopPrecompile has added the ability to reduce your compilation costs for specific packages:
using SnoopPrecompile, Preferences set_preferences!(SnoopPrecompile, "skip_precompile" => ["PackageA", "PackageB"])
If you’re a package developer, you might find it helpful to include the main package(s) you’re working on in the list of
I know that a number of packages have added support for various ad-hoc ENV variables to accomplish the same thing. I’d recommend removing that support and using the Preferences-based mechanism now supported by SnoopPrecompile. Why? Because with ENV variables it’s possible for your package cache to get into an inconsistent state (Unable to precompile Plots, Precompilation segfault after SnoopPrecompile was updated from v1.0.1 to v1.0.3 · Issue #2585 · MakieOrg/Makie.jl · GitHub), and the Preferences system is designed to prevent that from happening.
The biggest disadvantage of the Preferences system is that if you change the packages you list in
skip_precompile, you will likely have to re-precompile every package that depends (directly or indirectly) on SnoopPrecompile, and we are rapidly approaching the state where that’s pretty much the entire Julia ecosystem. As painful as that sounds, that is the main point of using Preferences: if you change how a low-level package is precompiled, every package that uses it needs to be recompiled and linked properly against the new version. It’s a bit unfortunate that even unrelated packages that happen to use SnoopPrecompile will also be re-precompiled, but better safe than sorry. And, of course, we welcome ideas (and especially pull requests ) for how to make this better.