-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Use io.BytesIO() instead of List[bytes] + b"".join() #10570
base: master
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #10570 will degrade performances by 45.58%Comparing Summary
Benchmarks breakdown
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #10570 +/- ##
==========================================
+ Coverage 98.69% 98.71% +0.01%
==========================================
Files 122 125 +3
Lines 37230 37367 +137
Branches 2064 2064
==========================================
+ Hits 36745 36885 +140
+ Misses 338 335 -3
Partials 147 147
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Tests seem to pass, but benchmarks show a drop in performance. Maybe that's why the list was used originally. |
I think the problem in #10550 is that everything is being done in a single |
I think if memory is an issue, a user should be using the streaming API. So, it's probably better here to optimise for CPU rather than memory. |
Thank you for the feedback. I'll try to address the performance issue |
What do these changes do?
Provisional PR to check that the solution proposed to issue #10550 doesn't break anything else
Are there changes in behavior for the user?
No user-level changes. This is intended to result in improved memory allocation / deallocation
Is it a substantial burden for the maintainers to support this?
No
Related issue number
#10550
Checklist
CONTRIBUTORS.txt
CHANGES/
foldername it
<issue_or_pr_num>.<type>.rst
(e.g.588.bugfix.rst
)if you don't have an issue number, change it to the pull request
number after creating the PR
.bugfix
: A bug fix for something the maintainers deemed animproper undesired behavior that got corrected to match
pre-agreed expectations.
.feature
: A new behavior, public APIs. That sort of stuff..deprecation
: A declaration of future API removals and breakingchanges in behavior.
.breaking
: When something public is removed in a breaking way.Could be deprecated in an earlier release.
.doc
: Notable updates to the documentation structure or buildprocess.
.packaging
: Notes for downstreams about unobvious side effectsand tooling. Changes in the test invocation considerations and
runtime assumptions.
.contrib
: Stuff that affects the contributor experience. e.g.Running tests, building the docs, setting up the development
environment.
.misc
: Changes that are hard to assign to any of the abovecategories.
Make sure to use full sentences with correct case and punctuation,
for example:
Use the past tense or the present tense a non-imperative mood,
referring to what's changed compared to the last released version
of this project.