summaryrefslogtreecommitdiff
path: root/apt-pkg/edsp/edspindexfile.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-06-20 21:33:56 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2014-09-27 00:09:35 +0200
commit78a5476f3177a2a74ae51a1878c26ca322a25003 (patch)
treece7572f671deaf5e07e01fff64432daaf97e4bd5 /apt-pkg/edsp/edspindexfile.cc
parenta3a91fd7bab34983a008854728baf26034d4033e (diff)
drop stored StringItems in favor of in-memory mappings
Strings like Section names or architectures are needed vary often. Instead of writing them each time we need them, we deploy sharing for these special strings. Until now, this was done with a linked list of strings in which we would search, which was stored in the cache. It turns out we can do this just as well in memory as well with a bunch of std::map's. In memory means here that it isn't available anymore if we have a partly invalid cache, but that isn't much of a problem in practice as the status file is compared to the other files we parse very small and includes mostly duplicates, so the space we would gain by storing is more or less equal to the size of the stored linked list…
Diffstat (limited to 'apt-pkg/edsp/edspindexfile.cc')
-rw-r--r--apt-pkg/edsp/edspindexfile.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/edsp/edspindexfile.cc b/apt-pkg/edsp/edspindexfile.cc
index e013dd44c..c38f24567 100644
--- a/apt-pkg/edsp/edspindexfile.cc
+++ b/apt-pkg/edsp/edspindexfile.cc
@@ -56,7 +56,7 @@ bool edspIndex::Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const
pkgCache::PkgFileIterator CFile = Gen.GetCurFile();
CFile->Size = Pkg.FileSize();
CFile->mtime = Pkg.ModificationTime();
- map_stringitem_t const storage = Gen.WriteUniqString("edsp::scenario");
+ map_stringitem_t const storage = Gen.StoreString(pkgCacheGenerator::MIXED, "edsp::scenario");
CFile->Archive = storage;
if (Gen.MergeList(Parser) == false)