Skip to content

Commit 2c10a6c

Browse files
committed
PERF: read file in chunks of 1 MB to compute hashes
1 parent 17bb8c4 commit 2c10a6c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pip/_internal/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def is_installable_dir(path: str) -> bool:
314314

315315

316316
def read_chunks(
317-
file: BinaryIO, size: int = io.DEFAULT_BUFFER_SIZE
317+
file: BinaryIO, size: int = 1_048_576
318318
) -> Generator[bytes, None, None]:
319319
"""Yield pieces of data from a file-like object until EOF."""
320320
while True:

0 commit comments

Comments
 (0)