single packages.Load for NameForPackage #983
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 simplified this PR to make the minimum necessary changes to get the job done. This PR supersedes #944
Unfortunately, I had to use global state because the existing code was using global state. I'm willing to refactor this in a follow up, ending up with something similar to #944 if that makes more sense.
I didn't add any new tests because exists tests already cover this change.
Non-scientific test comparing master vs this PR on our proprietary codebase:
Before:
After:
This is done on a pretty weak machine with somewhat slow IO. I used the second results for each after running the tests twice.
I have: