-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Move LinearAlgebra out of the system image. #59855
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
base: master
Are you sure you want to change the base?
Conversation
Delay the loading until we start the REPL. Co-authored-by: Viral B. Shah <viral@juliacomputing.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
I'm not sure if I did something wrong, but I made a clean build from this PR, and this is what I observe. The Julia startup is a bit faster. Loading LinearAlgebra is a bit slower but it is still sub second. The first factorization is a bit slower, but slowdown is small enough that I would much rather have the flexibility.
It also feels like the startup time is much lesser. The first one is this PR and the second one is stock julia 1.12.
The system image is 198M with LinearAlgebra (on 1.12) and 145M without (on this PR). |
return nothing | ||
end | ||
end | ||
Core._using(mod, MainInclude.LinearAlgebra) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should do this; LinearAlgebra is not using'd by default currently. We also don't need the identifier in MainInclude as far as I can tell.
I don't understand what the REPL has to do with anything and why you would want to load LinearAlgebra automatically in it. How does this get around the reasons we haven't moved it out already? |
I believe the thought here is that it can be outside the system image which means you don't get |
Making it REPL-specific will break scripts. Note we were ok with making InteractiveUtils REPL-specific because it's a bit unusual for a script to use something like Also in a way this makes LinearAlgebra harder to avoid. Previously if you built a system image without LA, then it wouldn't get loaded, but with this it will be loaded anyway. We could add a sysimage-build-time option (via |
Delay the loading until we start the REPL.
out of discussion with @ViralBShah