summaryrefslogtreecommitdiff
path: root/apt-pkg/deb/deblistparser.h
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2018-12-26 12:40:09 +0100
committerJulian Andres Klode <jak@debian.org>2018-12-26 21:24:20 +0100
commit563fedea263361b0786303f58dccc1a9a733e1d9 (patch)
tree8fe5fdca2e74f65a154f69ee8d4ac46629ce7420 /apt-pkg/deb/deblistparser.h
parent6018a849f46c7f701adbc4c2474de0b1177f3711 (diff)
debListParser: Avoid native arch lookup in ParseDepends
We called low-level ParseDepends without an architecture each time, which means each call looked up the native architecture. Store the native architecture in the class and use that when calling low-level ParseDepends from the high-level ParseDepends(). This improves performance for a cache build from 2.7 to 2.5 seconds for me. Also avoid a call when stripping multiarch, as the native architecture is passed in.
Diffstat (limited to 'apt-pkg/deb/deblistparser.h')
-rw-r--r--apt-pkg/deb/deblistparser.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h
index 09b56665f..f02252d58 100644
--- a/apt-pkg/deb/deblistparser.h
+++ b/apt-pkg/deb/deblistparser.h
@@ -45,6 +45,7 @@ class APT_HIDDEN debListParser : public pkgCacheListParser
std::vector<std::string> forceEssential;
std::vector<std::string> forceImportant;
std::string MD5Buffer;
+ std::string myArch;
protected:
pkgTagFile Tags;