Repository navigation
Conversation
08e9a16 to
c1720ba
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #14379 +/- ##
==========================================
- Coverage 99.12% 99.12% -0.01%
==========================================
Files 135 136 +1
Lines 53661 53713 +52
Branches 2737 2741 +4
==========================================
+ Hits 53191 53242 +51
Misses 356 356
- Partials 114 115 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Merging this PR will not alter performance1 warning
Performance Changes
Comparing Footnotes
|
|
@codspeed Can you run the new bench tests against master so we have a comparison? |
To let the performance wizard handle your request, please sign in to CodSpeed at codspeed.io so we can link your GitHub account, then comment again. |
|
@codspeed Can you run the new bench tests against master so we have a comparison? |
Only members of the |
|
Saw that one coming but had to try haha |
What do these changes do?
They replace per-release copying and shuffling of waiting host keys with rotation through an OrderedDict. Draining one waiter from each of N eligible host queues now takes O(N) scheduling work instead of O(N²).
Local benchmarks showed a 33x speedup for 100 hosts and a 535x speedup for 1600 hosts (yes, you read that correctly).
Are there changes in behavior for the user?
Cross-host scheduling changes from randomized selection to round-robin rotation. Connection limits, FIFO order within each host, and cancellation handling are preserved.
Clients queuing requests across many distinct hosts should spend less time scheduling waiting connections.
Is it a substantial burden for the maintainers to support this?
No new dependencies or public APIs are introduced. A single ordered mapping holds the host queues and their scheduling order, avoiding duplicate bookkeeping.
The main maintenance concern is preserving queue cleanup and rotation during cancellation and retries; regression tests cover these paths.
Related issue number
N/A
Checklist
CONTRIBUTORS.txtCHANGES/folder