<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/pkgcachegen.h, branch 1.9.9</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.9.9</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.9.9'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2020-01-14T12:10:36Z</updated>
<entry>
<title>Remove includes of (md5|sha1|sha2).h headers</title>
<updated>2020-01-14T12:10:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T20:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8c1a37e12790a23f3b132899485e011f9134b483'/>
<id>urn:sha1:8c1a37e12790a23f3b132899485e011f9134b483</id>
<content type='text'>
Remove it everywhere, except where it is still needed.
</content>
</entry>
<entry>
<title>Avoid extra out-of-cache hash table deduplication for package names</title>
<updated>2020-01-08T10:13:27Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-08T10:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=6902792898a9fcc3bdff605e2097e6a5cd2d6bbc'/>
<id>urn:sha1:6902792898a9fcc3bdff605e2097e6a5cd2d6bbc</id>
<content type='text'>
We were de-duplicating package name strings in StoreString, but also
deduplicating most of them by them being in groups, so we had extra
hash table lookups that could be avoided in NewGroup().

To continue deduplicating names across binary packages and source
packages, insert groups for source packages as well. This is also
a good first step in allowing efficient lookup of packages by source
package - we can extend Group later by a list of SourceVersion objects,
or alternatively, simply add a by-source chain into pkgCache::Version.

This change improves performance by about 10% (913 to 814 ms), while
having no significant overhead on the cache size:

--- before
+++ after
@@ -1,7 +1,7 @@
-Total package names: 109536 (2.191 k)
-Total package structures: 118689 (4.748 k)
+Total package names: 119642 (2.393 k)
+Total package structures: 118687 (4.747 k)
   Normal packages: 83309
-  Pure virtual packages: 3365
+  Pure virtual packages: 3363
   Single virtual packages: 17811
   Mixed virtual packages: 1973
   Missing: 12231
@@ -10,21 +10,21 @@ Total distinct descriptions: 149291 (3.583 k)
 Total dependencies: 484135/156650 (12,2 M)
 Total ver/file relations: 57421 (1.378 k)
 Total Desc/File relations: 18219 (437 k)
-Total Provides mappings: 29963 (719 k)
+Total Provides mappings: 29959 (719 k)
 Total globbed strings: 226993 (5.332 k)
 Total slack space: 26,8 k
-Total space accounted for: 38,1 M
+Total space accounted for: 38,3 M
 Total buckets in PkgHashTable: 50503
-  Unused: 5727
-  Used: 44776
-  Utilization: 88.6601%
-  Average entries: 2.65073
+  Unused: 5728
+  Used: 44775
+  Utilization: 88.6581%
+  Average entries: 2.65074
   Longest: 60
   Shortest: 1
 Total buckets in GrpHashTable: 50503
-  Unused: 5727
-  Used: 44776
-  Utilization: 88.6601%
-  Average entries: 2.44631
-  Longest: 10
+  Unused: 4649
+  Used: 45854
+  Utilization: 90.7946%
+  Average entries: 2.60919
+  Longest: 11
   Shortest: 1
</content>
</entry>
<entry>
<title>Make APT::StringView public</title>
<updated>2019-06-11T12:45:55Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-02-04T18:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a6e86d51a0e32cdc91f2902b0d6b483af884dcca'/>
<id>urn:sha1:a6e86d51a0e32cdc91f2902b0d6b483af884dcca</id>
<content type='text'>
</content>
</entry>
<entry>
<title>pkgcachegen: Remove deprecated functions</title>
<updated>2019-02-26T15:31:20Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-02-26T12:02:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=bf83608f21bc7da7a67db976658df0dff2e1dab5'/>
<id>urn:sha1:bf83608f21bc7da7a67db976658df0dff2e1dab5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Reformat and sort all includes with clang-format</title>
<updated>2017-07-12T11:57:51Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-07-12T11:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=87274d0f22e1dfd99b2e5200e2fe75c1b804eac3'/>
<id>urn:sha1:87274d0f22e1dfd99b2e5200e2fe75c1b804eac3</id>
<content type='text'>
This makes it easier to see which headers includes what.

The changes were done by running

    git grep -l '#\s*include'  \
        | grep -E '.(cc|h)$' \
        | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/'

To modify all include lines by adding a space, and then running
./git-clang-format.sh.
</content>
</entry>
<entry>
<title>Drop cacheiterators.h include</title>
<updated>2017-07-12T11:56:05Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-07-12T11:42:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c46f94aa48a9707668c46118b3eec77ff318b78c'/>
<id>urn:sha1:c46f94aa48a9707668c46118b3eec77ff318b78c</id>
<content type='text'>
Including cacheiterators.h before pkgcache.h fails because
pkgcache.h depends on cacheiterators.h.
</content>
</entry>
<entry>
<title>Do not use MD5SumValue for Description_md5()</title>
<updated>2016-11-22T21:58:33Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-09-27T22:49:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=49521f87851089bdb4097b715d09a8bd348aa60a'/>
<id>urn:sha1:49521f87851089bdb4097b715d09a8bd348aa60a</id>
<content type='text'>
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%.
</content>
</entry>
<entry>
<title>deal better with (very) small apt::cache-start values</title>
<updated>2016-01-26T23:15:12Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-26T23:15:12Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a133f79c8766aee5b7d7811285e60b3d311d8473'/>
<id>urn:sha1:a133f79c8766aee5b7d7811285e60b3d311d8473</id>
<content type='text'>
It is a bit academic to support values which aren't big enough to fit even
the hashtables without resizing, but cleaning up ensures that we do the
right thing (aka not segfaulting) even if something goes wrong in these
deep layers. You still can't have very very small values through…

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>convert Version() and Architecture() to APT::StringView</title>
<updated>2016-01-26T22:18:05Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-26T22:18:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8efd5947bf7de0fc3db51b4871bcf3522018761d'/>
<id>urn:sha1:8efd5947bf7de0fc3db51b4871bcf3522018761d</id>
<content type='text'>
Part of hidden classes, so conversion is abi-free.

Git-Dch: Ignore
</content>
</entry>
<entry>
<title>remove unused Description methods in listparsers</title>
<updated>2016-01-26T20:58:57Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-26T20:58:57Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=02ceb810fe0de9b267a8b6a302505967afce6b5a'/>
<id>urn:sha1:02ceb810fe0de9b267a8b6a302505967afce6b5a</id>
<content type='text'>
These virtual methods are implemented in hidden classes, so we can drop
them without breaking the ABI.

Git-Dch: Ignore
</content>
</entry>
</feed>
