From b350560e34a369ef7610f9fceeffb00660209390 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 7 Jan 2020 19:55:48 +0100 Subject: 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. --- apt-pkg/contrib/macros.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-pkg/contrib/macros.h') 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 -- cgit v1.2.3