-
Notifications
You must be signed in to change notification settings - Fork 549
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
fetch: avoid async iteration when request.body is null #1303
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1303 +/- ##
=======================================
Coverage 94.16% 94.16%
=======================================
Files 45 45
Lines 4112 4114 +2
=======================================
+ Hits 3872 3874 +2
Misses 240 240
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a unit test?
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to think about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RafaelGSS I slightly modified your PR. Hope you don't mind. LGTM. If you approve we can merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems there are some pushes from other branches. Overall LGTM.
* fetch: avoid iteration when request.body is null * slightly simplify Co-authored-by: Robert Nagy <[email protected]>
* fetch: avoid iteration when request.body is null * slightly simplify Co-authored-by: Robert Nagy <[email protected]>
* fetch: avoid iteration when request.body is null * slightly simplify Co-authored-by: Robert Nagy <[email protected]>
It avoids treating
request.body
as an async iterator when it's null.In my local tests, it increases the performance by almost 10%.