only store version of packages during load time when generating sysimage#46738
Merged
KristofferC merged 1 commit intomasterfrom Sep 14, 2022
Merged
only store version of packages during load time when generating sysimage#46738KristofferC merged 1 commit intomasterfrom
KristofferC merged 1 commit intomasterfrom
Conversation
Member
Couldn't this be solved by storing the version in the |
Member
Author
That probably also works. I am not sure I see a big advantage doing that over this PR though. |
vtjnash
reviewed
Sep 13, 2022
Member
vtjnash
left a comment
There was a problem hiding this comment.
LGTM. But didn't we already have to parse this TOML file as part of picking the package to load?
Member
Author
I don't think so. All that is required is the current Project + Manifest to compute what is loaded. |
f297b5c to
9c129f4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am looking at the number of stat calls during code loading (precompilation). One somewhat significant source of these is the lookup of the
versionfield in the project file of packages (added in #44318) that happens as soon as a package is loaded. Due to the way the precompilation process work (IIUC), the number of these lookup scales quadratically with the depth of the dependency tree of a package.This PR changes it so that the lookup only happens when a call to
pkgversionactually requests the version. An exception is when a sysimage is generated (for example from PackageCompiler) because then we want to also store the version to support the functionality in JuliaLang/Pkg.jl#3002.The script I am using to measure the number of stat calls is:
executed in an environment with only
GR_jllinstalled. The results areThis may not seem like a huge reduction but further work on #46690 brings the baseline down heavily where this absolute difference is quite significant.