Cache the hash generation of the ConnectionKey#8895
Merged
Conversation
This hash is a bit expensive to compute and BaseConnector.connect needs to compute it many times
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## 3.11 #8895 +/- ##
=======================================
Coverage 97.69% 97.70%
=======================================
Files 108 108
Lines 34169 34198 +29
Branches 4064 4064
=======================================
+ Hits 33383 33413 +30
+ Misses 587 586 -1
Partials 199 199
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Contributor
Backport to 3.10: 💚 backport PR created✅ Backport PR branch: Backported as #8903 🤖 @patchback |
patchback bot
pushed a commit
that referenced
this pull request
Aug 26, 2024
(cherry picked from commit 68629b5)
bdraco
added a commit
that referenced
this pull request
Aug 26, 2024
…onnectionKey (#8903) Co-authored-by: J. Nick Koston <nick@koston.org>
5 tasks
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.
What do these changes do?
This hash is a bit expensive to compute and BaseConnector.connect needs to compute it many times, turn on the cache. I noticed this kept showing up in the profile when looking for another issue.
Note that
masterhas moved to dataclasses so this is only relevant for 3.11/3.10Are there changes in behavior for the user?
no
Is it a substantial burden for the maintainers to support this?
no
before

after
