From 563fedea263361b0786303f58dccc1a9a733e1d9 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 26 Dec 2018 12:40:09 +0100 Subject: 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. --- apt-pkg/deb/deblistparser.h | 1 + 1 file changed, 1 insertion(+) (limited to 'apt-pkg/deb/deblistparser.h') 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 forceEssential; std::vector forceImportant; std::string MD5Buffer; + std::string myArch; protected: pkgTagFile Tags; -- cgit v1.2.3