Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add precompilation #653

Closed
wants to merge 1 commit into from
Closed

add precompilation #653

wants to merge 1 commit into from

Conversation

baggepinnen
Copy link
Member

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

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.

@JuliaControlBot
Copy link

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.

@baggepinnen
Copy link
Member Author

Closed by #838

@baggepinnen baggepinnen deleted the precompilation branch May 26, 2023 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants