Skip to content

bpo-32529: imporved shutil.copyfileobj#5158

Closed
YoSTEALTH wants to merge 7 commits into
python:masterfrom
YoSTEALTH:YoSTEALTH-patch-2-2
Closed

bpo-32529: imporved shutil.copyfileobj#5158
YoSTEALTH wants to merge 7 commits into
python:masterfrom
YoSTEALTH:YoSTEALTH-patch-2-2

Conversation

@YoSTEALTH

@YoSTEALTH YoSTEALTH commented Jan 11, 2018

Copy link
Copy Markdown
Contributor

Improved "copyfileobj" function to use less memory if provided Bytes IO and fixed potential encoding mismatch corruption in Text IO

https://bugs.python.org/issue32529

@tiran tiran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Before this patch gets merged, please provide memory and performance benchmarks for this change on the ticket

In case your benchmark show an improvement, you have to provide tests for the change, too.

@bedevere-bot

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

After a good debate on #python i have removed the encoding checks as copyfileobj could potentially be used as encoding converter tool
@YoSTEALTH

Copy link
Copy Markdown
Contributor Author

here is the links to benchmark:
https://repl.it/@altendky/timeit-of-proposed-shutilfileobjcopy
https://gist.github.com/altendky/ff5ccee2baf9822dce69ae8aa66a0fdf
https://paste.pound-python.org/show/urORPXztcbDlqXKTORAj/ # time ./file.py

the problem is the result times are so sparitic that not sure what to post as the result! I have tried with actual file as well and the results are all over the place.

If any of you out there are can do benchmark that can produce accurate results and post the result it would help.

@YoSTEALTH YoSTEALTH closed this Jan 16, 2018
@YoSTEALTH YoSTEALTH deleted the YoSTEALTH-patch-2-2 branch February 14, 2018 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants