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

Low-level API: transports' send_all_from_iterable() method are more efficient #315

Conversation

francis-clairicia
Copy link
Owner

What's changed

Asynchronous API

  • AsyncStreamWriteTransport: Default implementation of send_all_from_iterable() consumes the iterable before trying to call send_all()

Synchronous API

  • StreamWriteTransport: Default implementation of send_all_from_iterable() consumes the iterable before trying to call send_all()
  • SocketStreamTransport.send_all_from_iterable(): Code cleanup
  • SSLStreamTransport: Override send_all_from_iterable() to concatenate the given data and call send_all() once.

@francis-clairicia francis-clairicia added enhancement New feature or request topic-async Relative to asynchronous API topic-sync Relative to synchronous API labels Jun 30, 2024
@francis-clairicia francis-clairicia self-assigned this Jun 30, 2024
Copy link

codecov bot commented Jun 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (f5a3abb) to head (57e8fb0).
Report is 53 commits behind head on main.

Additional details and impacted files
Flag Coverage Δ
OS-Linux 99.87% <100.00%> (+<0.01%) ⬆️
OS-Windows 99.75% <100.00%> (+<0.01%) ⬆️
OS-macOS 99.87% <100.00%> (+<0.01%) ⬆️
Py-3.11 99.84% <100.00%> (+<0.01%) ⬆️
Py-3.12 99.74% <100.00%> (+<0.01%) ⬆️
test-functional 82.25% <59.09%> (-0.04%) ⬇️
test-unit 89.01% <100.00%> (+0.01%) ⬆️

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

@francis-clairicia francis-clairicia merged commit fcc404b into main Jun 30, 2024
22 checks passed
@francis-clairicia francis-clairicia deleted the fix/lowlevel-api/transports/send-all-from-iterable-optimizations branch June 30, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic-async Relative to asynchronous API topic-sync Relative to synchronous API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant