Skip to content

perf: improve release validation performance#279

Open
letFunny wants to merge 2 commits intocanonical:mainfrom
letFunny:performance-improvements
Open

perf: improve release validation performance#279
letFunny wants to merge 2 commits intocanonical:mainfrom
letFunny:performance-improvements

Conversation

@letFunny
Copy link
Copy Markdown
Collaborator

@letFunny letFunny commented Apr 1, 2026

Avoid expensive calls to look for conflicts when the prefixes do not
match.

  • Have you signed the CLA?

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.

Avoid expensive calls to look for conflicts when the prefixes do not
match.
@letFunny
Copy link
Copy Markdown
Collaborator Author

letFunny commented Apr 1, 2026

The comment is not posted, I have downloaded the numbers from the CI artifacts:

| Command | Mean [s] | Min [s] | Max [s] | Relative |
|:---|---:|---:|---:|---:|
| `BASE` | 13.901 ± 0.136 | 13.709 | 14.233 | 3.11 ± 0.07 |
| `HEAD` | 4.477 ± 0.087 | 4.391 | 4.619 | 1.00 |

So a 3x improvement.

@letFunny letFunny marked this pull request as draft April 1, 2026 11:08
@letFunny letFunny marked this pull request as ready for review April 1, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant