summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edsplistparser.cc
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-09-28 00:49:45 +0200
committerJulian Andres Klode <jak@debian.org>2016-11-22 22:58:33 +0100
commit49521f87851089bdb4097b715d09a8bd348aa60a (patch)
tree7cedcd05be67505f4949eb18dbe155178b76e4bb /apt-pkg/edsp/edsplistparser.cc
parentc0723bf1a60daf45096998d4ae9feee3c44343f8 (diff)
Do not use MD5SumValue for Description_md5()
Our profile says we spend about 5% of the time transforming the hex digits into the binary format used by HashsumValue, all for comparing them against the other strings. That makes no sense at all. According to callgrind, this reduces the overall instruction count from 5,3 billion to 5 billion in my example, which roughly matches the 5%.
Diffstat (limited to 'apt-pkg/edsp/edsplistparser.cc')
-rw-r--r--apt-pkg/edsp/edsplistparser.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/apt-pkg/edsp/edsplistparser.cc b/apt-pkg/edsp/edsplistparser.cc
index c6fd528da..4119639a6 100644
--- a/apt-pkg/edsp/edsplistparser.cc
+++ b/apt-pkg/edsp/edsplistparser.cc
@@ -20,6 +20,7 @@
#include <apt-pkg/tagfile.h>
#include <apt-pkg/fileutl.h>
#include <apt-pkg/pkgsystem.h>
+#include <apt-pkg/string_view.h>
#include <array>
@@ -53,9 +54,9 @@ std::vector<std::string> edspLikeListParser::AvailableDescriptionLanguages()
{
return {};
}
-MD5SumValue edspLikeListParser::Description_md5()
+APT::StringView edspLikeListParser::Description_md5()
{
- return MD5SumValue("");
+ return APT::StringView();
}
/*}}}*/
// ListParser::VersionHash - Compute a unique hash for this version /*{{{*/