Repository navigation
reuse.py: avoid _create_external_parser - #51653
Merged
Merged
Conversation
haampie
force-pushed
the
hs/fix/avoid-create_external_parser
branch
from
November 27, 2025 15:54
626ba63 to
7060448
Compare
alalazo
reviewed
Nov 27, 2025
alalazo
reviewed
Nov 27, 2025
haampie
force-pushed
the
hs/fix/avoid-create_external_parser
branch
5 times, most recently
from
December 8, 2025 09:43
0711138 to
0b24292
Compare
In the setup phase of the solver, pre-process the packages.yaml config once (i.e. expanding config on virtuals to config on its providers, and adding libc from compiler inspection) and compute the effective external specs once and only once. This should speed up the setup phase. Signed-off-by: Harmen Stoppels <[email protected]>
haampie
force-pushed
the
hs/fix/avoid-create_external_parser
branch
from
December 9, 2025 10:53
0b24292 to
27c5840
Compare
alalazo
approved these changes
Dec 10, 2025
alalazo
left a comment
Member
There was a problem hiding this comment.
We can polish the function calls later. This still gives a 5% improvement on setup time on my laptop.
3 tasks done
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.
The function
_create_external_parseris called for each reuse source, and triggers some expensive code paths down the line. Fix by calling it once ahead of time.Also some renaming:
packages->packages_with_externals_create_external_parser->create_external_parser