stop propagating the dict to precompile workers via repr #37989
Merged
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 completely misjudged the cost of
repr
on a heavily nested dict:waaat(!!??).
With that time for
repr
, we just have to stop propagating the dict to the workers via this method. At least the workers will just parse the toml dict once each.Noticed by @ianshmean when his parallel precompile PR in Pkg started lagging.
The culprit seems to be
which I'm guessing is the new fancy type alias printing.
We could perhaps go via
TOML.print
:or serialization
but that can be a follow-up (neither of these are available in Base so it isn't trivial to swap).
Edit: Fun fact,
names
gets called 308 times for thisrepr
.