Repository navigation
Speed up Enum lookup - #1296
Merged
Merged
Speed up Enum lookup#1296
Conversation
Member
Author
|
@jonathanberthias would you mind taking a look, please? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1296 +/- ##
==========================================
- Coverage 58.15% 57.58% -0.58%
==========================================
Files 27 27
Lines 6012 6042 +30
==========================================
- Hits 3496 3479 -17
- Misses 2516 2563 +47 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
jonathanberthias
approved these changes
Nov 17, 2026
jonathanberthias
left a comment
Contributor
There was a problem hiding this comment.
Very nice way to speed things up!
Joao-Dionisio
enabled auto-merge
November 18, 2026 10:19
Joao-Dionisio
disabled auto-merge
November 18, 2026 10:19
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.
#1286 introduced a bit of a slowdown. It's nothing that would be super noticeable, but it's still something I'd be more comfortable with speeding up. Here's how individual calls look like:
Which corresponds to the following slowdown:
As I said, not huge, but still something. In this PR, we create dicts to speed up the lookup.
I also added missing flags for events and heuristic timings, etc.