diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-07 19:55:48 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-01-14 13:10:36 +0100 |
commit | b350560e34a369ef7610f9fceeffb00660209390 (patch) | |
tree | 4a0def641d79b2d2ecf570a490d6cf264d58c01e /apt-pkg/contrib/macros.h | |
parent | 814ffcfaf34ad1d35e397eeaaafefbf03faed9cf (diff) |
Raise buffer size for Hashes::AddFD() from 4 KiB to 64 KiB
Move APT_BUFFER_SIZE to macros.h and re-use it in hashes,
this also might speed up stuff, the motivation for using
64 KiB buffers in fileutl.cc was precisely that after all.
Diffstat (limited to 'apt-pkg/contrib/macros.h')
-rw-r--r-- | apt-pkg/contrib/macros.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apt-pkg/contrib/macros.h b/apt-pkg/contrib/macros.h index 340549fbd..7e42092f6 100644 --- a/apt-pkg/contrib/macros.h +++ b/apt-pkg/contrib/macros.h @@ -128,4 +128,7 @@ #define APT_PKG_590(msg) #endif +/* Should be a multiple of the common page size (4096) */ +static constexpr unsigned long long APT_BUFFER_SIZE = 64 * 1024; + #endif |