Mercurial > hg
comparison tests/test-largefiles-small-disk.t @ 30181:7356e6b1f5b8
util: increase filechunkiter size to 128k
util.filechunkiter has been using a chunk size of 64k for more than 10 years,
also in years where Moore's law still was a law. It is probably ok to bump it
now and perhaps get a slight win in some cases.
Also, largefiles have been using 128k for a long time. Specifying that size
multiple times (or forgetting to do it) seems a bit stupid. Decreasing it to
64k also seems unfortunate.
Thus, we will set the default chunksize to 128k and use the default everywhere.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 14 Oct 2016 01:53:15 +0200 |
parents | 8a021cd38719 |
children | 1ef37b16b8e8 |
comparison
equal
deleted
inserted
replaced
30180:736f92c44656 | 30181:7356e6b1f5b8 |
---|---|
9 > fdst.write(fsrc.read(4)) | 9 > fdst.write(fsrc.read(4)) |
10 > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) | 10 > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) |
11 > shutil.copyfileobj = copyfileobj | 11 > shutil.copyfileobj = copyfileobj |
12 > # | 12 > # |
13 > # this makes the rewritten code abort: | 13 > # this makes the rewritten code abort: |
14 > def filechunkiter(f, size=65536, limit=None): | 14 > def filechunkiter(f, size=131072, limit=None): |
15 > yield f.read(4) | 15 > yield f.read(4) |
16 > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) | 16 > raise IOError(errno.ENOSPC, os.strerror(errno.ENOSPC)) |
17 > util.filechunkiter = filechunkiter | 17 > util.filechunkiter = filechunkiter |
18 > # | 18 > # |
19 > def oslink(src, dest): | 19 > def oslink(src, dest): |