-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix regression of Pkg and more #55721
Conversation
You say this fixes a regression? What is the regression and what are the before and after numbers with this PR? |
If I do:
That's the regression I'm working on. [But while I enter pkg mode immediately, seemingly, I think it's because of async, so a bit deceiving, why this regression hasn't been seen, or is known but papered over. I realize you don't want Pkg in the sysimage, and I agree, but it has its own pkgimage?! Also the precompile is only for Base, not Pkg, specifically, though I think it benefits from it.] I haven't confirmed that this fixes this regression, but CondaPkg has Pkg as a dependency, this might, but I haven't tested locally yet. I think it should since, locally, without this:
|
Okay but the title of the PR says "Fix regression" so how do you know this is true if you haven't confirmed it? These precompile signatures execute very fast so I am surprised they would do much at all?
|
Ok, sorry about that, maybe turn this into an issue? I assumed it fixes, since I only saw those with --trace-compile=stderr, and I'm stumped on what else is needed to fix this. Do you know what it might be? Feel free to answer and/or close this PR if it's useless, might not be possible to migrate it to an issue. |
Pkg is not in the sysimage anymore so it costs a bit to load it. |
Please add to 1.11 backport, because (Markdown and) Pkg are used by code, such as PythonCall (indirectly), not just interactively.
This is emitted for Pkg and Markdown:
precompile(Tuple{typeof(Base.setindex!), Base.EnvDict, Bool, String})
This one too for Pkg:
precompile(Tuple{typeof(Base.first), Array{Any, 1}})
I do not add to Pkg section, it and REPL one seem should not exist... from when they where in the sysimage? Those precompiles should still likely still be in, since useful for other code, might be moved into misc too.
This may not be strictly needed, I've (only?) seen this when exiting the REPL:
precompile(Tuple{typeof(Base.print), Base.TTY, String})
I didn't time any of these yet, a difference when in the sysimage, or how much larger it gets, e.g. for that last one.