Commit 6f67de7
committed
Read chunks in Python's default buffer size
I observed minor performance improvements by using this larger chunk
read size.
Python's docs describe `io.DEFAULT_BUFFER_SIZE` as:
> An int containing the default buffer size used by the module’s
> buffered I/O classes. open() uses the file’s blksize ...
The docs on `blksize` say:
> “Preferred” blocksize for efficient file system I/O. Writing to a file
> in smaller chunks may cause an inefficient read-modify-rewrite.
References:
- https://docs.python.org/3/library/io.html#io.DEFAULT_BUFFER_SIZE
- https://docs.python.org/3/library/os.html#os.stat_result.st_blksize1 parent 75fbed7 commit 6f67de7
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
74 | | - | |
| 75 | + | |
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| |||
0 commit comments