Mercurial > public > mercurial-scm > hg-stable
diff hgext/largefiles/overrides.py @ 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 | 3dcaf1c4e90d |
children | 438173c41587 |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Wed Oct 12 12:22:18 2016 +0200 +++ b/hgext/largefiles/overrides.py Fri Oct 14 01:53:15 2016 +0200 @@ -1356,7 +1356,7 @@ 'downloaded') % lf) path = lfutil.usercachepath(repo.ui, hash) with open(path, "rb") as fpin: - for chunk in util.filechunkiter(fpin, 128 * 1024): + for chunk in util.filechunkiter(fpin): fp.write(chunk) err = 0 return err