Skip to content

[PR #8895/68629b52 backport][3.10] Cache the hash generation of the ConnectionKey#8903

Merged
bdraco merged 1 commit into3.10from
patchback/backports/3.10/68629b523f4f91651ab75b23a534881794f82a26/pr-8895
Aug 26, 2024
Merged

[PR #8895/68629b52 backport][3.10] Cache the hash generation of the ConnectionKey#8903
bdraco merged 1 commit into3.10from
patchback/backports/3.10/68629b523f4f91651ab75b23a534881794f82a26/pr-8895

Conversation

@patchback
Copy link
Contributor

@patchback patchback bot commented Aug 26, 2024

This is a backport of PR #8895 as merged into 3.11 (68629b5).

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 master has moved to dataclasses so this is only relevant for 3.11/3.10

Are there changes in behavior for the user?

no

Is it a substantial burden for the maintainers to support this?

no

before
before_hash

after
after_hash

@bdraco bdraco enabled auto-merge (squash) August 26, 2024 19:25
@codecov
Copy link

codecov bot commented Aug 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.70%. Comparing base (e2631c7) to head (aeab59f).
Report is 215 commits behind head on 3.10.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             3.10    #8903   +/-   ##
=======================================
  Coverage   97.70%   97.70%           
=======================================
  Files         108      108           
  Lines       34215    34215           
  Branches     4067     4067           
=======================================
  Hits        33431    33431           
  Misses        586      586           
  Partials      198      198           
Flag Coverage Δ
CI-GHA 97.60% <100.00%> (ø)
OS-Linux 97.27% <100.00%> (ø)
OS-Windows 94.83% <100.00%> (ø)
OS-macOS 96.96% <100.00%> (ø)
Py-3.10.11 97.05% <100.00%> (ø)
Py-3.10.14 96.98% <100.00%> (ø)
Py-3.11.9 97.22% <100.00%> (ø)
Py-3.12.4 94.63% <100.00%> (ø)
Py-3.12.5 97.01% <100.00%> (ø)
Py-3.8.10 94.46% <100.00%> (ø)
Py-3.8.18 96.79% <100.00%> (ø)
Py-3.9.13 96.95% <100.00%> (ø)
Py-3.9.19 96.89% <100.00%> (ø)
Py-pypy7.3.16 96.48% <100.00%> (+<0.01%) ⬆️
VM-macos 96.96% <100.00%> (ø)
VM-ubuntu 97.27% <100.00%> (ø)
VM-windows 94.83% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco merged commit 9360a91 into 3.10 Aug 26, 2024
@bdraco bdraco deleted the patchback/backports/3.10/68629b523f4f91651ab75b23a534881794f82a26/pr-8895 branch August 26, 2024 19:59
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