perf: improve release validation performance#279
Open
letFunny wants to merge 2 commits intocanonical:mainfrom
Open
perf: improve release validation performance#279letFunny wants to merge 2 commits intocanonical:mainfrom
letFunny wants to merge 2 commits intocanonical:mainfrom
Conversation
Avoid expensive calls to look for conflicts when the prefixes do not match.
Collaborator
Author
|
The comment is not posted, I have downloaded the numbers from the CI artifacts: So a 3x improvement. |
1 task
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.
Avoid expensive calls to look for conflicts when the prefixes do not
match.
I tried many performance improvements and rewrites of the logic below. This are the only ones that move the needle significantly. With big rewrites of the algorithm I am able to get a ~6% more, so in my opinion it is not worth going that route of extra complexity and longer reviews; we should look for performance improvements elsewhere. I also tried many other tricks like finding the end index by using binary search as well, being more clever about the prefix, etc. and none of them increased performance more than 2/3% compared to this PR, so again they were not included as they made the code more complex.