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

Collapse request chunked data and framing into one send() call #1906

Merged
merged 1 commit into from Jul 16, 2020

Conversation

sethmlarson
Copy link
Member

@sethmlarson sethmlarson commented Jul 16, 2020

Looking at how urllib3 behaves with Wireshark I saw chunks and chunk framing being sent in separate TCP packets even when only a few bytes. Collapsing data and framing into one send() call alleviated this issue. Should reduce the number of TCP packets sent when using request_chunked by ~2-4x.

I'd like to backport this to 1.25-series and potentially make a release there with other bug fixes that have landed.

@codecov
Copy link

codecov bot commented Jul 16, 2020

Codecov Report

Merging #1906 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1906   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines         2049      2109   +60     
=========================================
+ Hits          2049      2109   +60     
Flag Coverage Δ
#unittests 99.56% <100.00%> (+<0.01%) ⬆️
Impacted Files Coverage Δ
src/urllib3/connection.py 100.00% <100.00%> (ø)
src/urllib3/util/ssl_.py 100.00% <0.00%> (ø)
src/urllib3/util/__init__.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe1f73b...113f448. Read the comment docs.

Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

@pquentin pquentin merged commit 42ec81d into urllib3:master Jul 16, 2020
@sethmlarson sethmlarson deleted the request-chunked-send branch July 16, 2020 16:26
This was referenced Mar 12, 2021
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.

None yet

2 participants