summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/macros.h
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2020-01-07 19:55:48 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2020-01-14 13:10:36 +0100
commitb350560e34a369ef7610f9fceeffb00660209390 (patch)
tree4a0def641d79b2d2ecf570a490d6cf264d58c01e /apt-pkg/contrib/macros.h
parent814ffcfaf34ad1d35e397eeaaafefbf03faed9cf (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.h3
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