Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get next available stream ID more efficiently #338

Closed
wants to merge 1 commit into from

Conversation

msoxzw
Copy link
Contributor

@msoxzw msoxzw commented Nov 2, 2022

The itertools.count() not only satisfies stream ID requirement, but also runs faster, because it remembers current stream ID and is implemented by C.

@codecov
Copy link

codecov bot commented Nov 2, 2022

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.05 ⚠️

Comparison is base (09a0833) 100.00% compared to head (e32045b) 99.95%.

❗ Current head e32045b differs from pull request most recent head af238b5. Consider uploading reports for the commit af238b5 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #338      +/-   ##
===========================================
- Coverage   100.00%   99.95%   -0.05%     
===========================================
  Files           22       23       +1     
  Lines         4553     4534      -19     
===========================================
- Hits          4553     4532      -21     
- Misses           0        2       +2     
Impacted Files Coverage Δ
src/aioquic/quic/connection.py 99.92% <100.00%> (-0.08%) ⬇️

... and 6 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

The [`itertools.count()`](https://docs.python.org/3/library/itertools.html#itertools.count) not only satisfies [stream ID requirement](https://www.rfc-editor.org/rfc/rfc9000.html#name-stream-types-and-identifier), but also runs faster, because it remembers current stream ID and is implemented by C.
@jlaine
Copy link
Contributor

jlaine commented Apr 2, 2023

I don't think this is correct, you are changing the state of the connection on every call, which is not the current behaviour?

@jlaine
Copy link
Contributor

jlaine commented Nov 4, 2023

Closing in favour of #403

@jlaine jlaine closed this Nov 4, 2023
@msoxzw msoxzw deleted the patch-3 branch January 11, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants