#4272 Replace iter_content with copyfileobj
Opened by tkopecek. Modified
tkopecek/koji download-speed  into  master

Download 4272.patch

It is a bit faster. With a local server it gives 70% of original time.
For real network the gain would be smaller, but doesn't hurt to have it
there.

I'm curious why one is faster, and whether that will be true across different versions of python and requests

I suspect that at least buffer is much larger (8k vs 64k), but I've not tested the former with 64k buffer.

https://github.com/python/cpython/blob/3.13/Lib/shutil.py#L47

Metadata