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

add precompilation

Open baggepinnen opened this issue 2 years ago • 1 comments

I'm marking this as a draft. The current benefit is not really large enough to include, but

  • https://github.com/JuliaLang/julia/pull/43990

may make it more worthwhile. In particular, I'm worried about the extra overhead incurred by developers of the package, hence the experimentation with

if !(occursin(joinpath(".julia", "dev"), __CONTROLSYSTEMS_SOURCE_DIR__))
    # Only precompile if the package is not checked out for development. Precompilation takes about 6 seconds, and saves about 2-3 seconds on the compilation script. For a user loading the same version of the package multiple times, precompilation makes the experience slightly more snappy. For a developer, paying the precompilation price each time the package has been modified is unlikely to be beneficial.
    include("precompile.jl")
end

The user may save about 2 seconds on a simple but representative workflow, but the loading time of the package goes up by about 0.15s. The precompilation time of the package will, however, go up with a whopping 4 seconds, so unless there is a bigger benefit of the precompilation, I'm not sure it's worth it.

baggepinnen avatar Feb 23 '22 06:02 baggepinnen

Something failed when generating plots. See the log at https://github.com/JuliaControl/ControlExamplePlots.jl/actions/runs/1885746208?check_suite_focus=true for more details.

JuliaControlBot avatar Feb 23 '22 06:02 JuliaControlBot

Closed by #838

baggepinnen avatar May 26 '23 07:05 baggepinnen