<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/pkgcachegen.cc, branch 1.2.1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.2.1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.2.1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2016-01-23T14:40:17Z</updated>
<entry>
<title>Remap another (non-parameter) StringView</title>
<updated>2016-01-23T14:40:17Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-23T14:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8ee09b58e9f061cf5296c54680e2b3386f83ff04'/>
<id>urn:sha1:8ee09b58e9f061cf5296c54680e2b3386f83ff04</id>
<content type='text'>
I only looked at parameters in the previous commit, which was
not enough: One place also generated local string views. In this
case, we only need to make ArchA dynamic, as NameA is not used
after the FindPkg() call.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>Remap StringView instances pointing into the cache</title>
<updated>2016-01-23T14:20:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-23T12:15:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7dd0c2eb45874d3df9a9ee2034501659548a1b97'/>
<id>urn:sha1:7dd0c2eb45874d3df9a9ee2034501659548a1b97</id>
<content type='text'>
It turns out that StringViews might need to be remapped in some
places because they come from the cache. For example, some sites
pass a Ver.VerStr() to NewProvides().

Such a StringView would become invalid during the duration of
the call if the cache is remapped, causing the program to die
with a segmentation fault.

We can take care of those issues by remapping string views in
the same way we remap all the iterators. String views are only
remapped if they point into the cache though, this allows us
to write more generic code on the callee site without having
to check whether the view points into the cache or not.
That's not as efficient as possible, but the overhead does not
appear to be measurable.

Closes: #812251
</content>
</entry>
<entry>
<title>Pass the old map size to ReMap()</title>
<updated>2016-01-23T14:13:04Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-23T14:02:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=19819ac58a420275e0ae9aa7e2a34c72cba8af5e'/>
<id>urn:sha1:19819ac58a420275e0ae9aa7e2a34c72cba8af5e</id>
<content type='text'>
This allows us to check if a value to be remapped was inside
the cache or not, which will become useful at a later point.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>fix M-A:foreign provides creation for unknown archs</title>
<updated>2016-01-14T22:08:02Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-01-14T19:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=62428dbc17ffa7b5b8188e88609a9438428d6024'/>
<id>urn:sha1:62428dbc17ffa7b5b8188e88609a9438428d6024</id>
<content type='text'>
Architectures for packages which do not belong to the native nor a
foreign architecture (dubbed barbarian for now) which are marked
M-A:foreign still provide in their own architecture even if not for
others. Also, other M-A:foreign (and allowed) packages provide in these
barbarian architectures.
</content>
</entry>
<entry>
<title>Store the size of strings in the cache</title>
<updated>2016-01-08T20:20:25Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-08T10:12:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=60d523e2ae93a6c5bc396b6bede2544271fb1f2e'/>
<id>urn:sha1:60d523e2ae93a6c5bc396b6bede2544271fb1f2e</id>
<content type='text'>
By storing the size of the string in the cache, we can make use of
it when comparing the names in the hashtable in pkgCache::FindGrp.
</content>
</entry>
<entry>
<title>pkgCacheGenerator: CurMd5.Value() cannot be empty</title>
<updated>2016-01-08T11:23:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-08T11:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=24c7db2edea692c3778c021c053a2316203bfa03'/>
<id>urn:sha1:24c7db2edea692c3778c021c053a2316203bfa03</id>
<content type='text'>
It makes no sense to check if the value is empty, as it cannot
be. It will always be a hexstring of exactly 32 bytes.
</content>
</entry>
<entry>
<title>pkgCacheGenerator::StoreString: Get rid of std::string</title>
<updated>2016-01-08T00:30:18Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-08T00:27:01Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=869700d839a1695fe00734592bd504d59386e4b9'/>
<id>urn:sha1:869700d839a1695fe00734592bd504d59386e4b9</id>
<content type='text'>
Instead of storing a string -&gt; map_stringitem_t mapping, create
our own data type that can point to either a normal string or
a string inside the cache.

This avoids the creation of any string and improves performance
slightly (about 4%).
</content>
</entry>
<entry>
<title>Replace compare() == 0 checks with this == other checks</title>
<updated>2016-01-07T23:52:29Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-07T23:52:29Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=57590d3c6e6b055402c938c3baebf1d872c58f7e'/>
<id>urn:sha1:57590d3c6e6b055402c938c3baebf1d872c58f7e</id>
<content type='text'>
This improves performance, as we now can ignore unequal strings
based on their length already.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>pkgCacheGenerator: Use StringView for toString</title>
<updated>2016-01-07T23:41:14Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-07T23:41:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dd592790c8f1be4925f74266742c163516ab80c7'/>
<id>urn:sha1:dd592790c8f1be4925f74266742c163516ab80c7</id>
<content type='text'>
This removes some minor overhead.

Gbp-Dch: ignore
</content>
</entry>
<entry>
<title>pkgCacheGenerator::StoreString: Move the string into the map</title>
<updated>2016-01-07T23:32:26Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2016-01-07T23:25:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c5a858e39f83676fdf16f1bdae5966c96ee882ff'/>
<id>urn:sha1:c5a858e39f83676fdf16f1bdae5966c96ee882ff</id>
<content type='text'>
Moving the string is likely faster than copying it. We could probably
avoid strings alltogether in the future using some more crazy code,
but I have not looked at that yet.

Gbp-Dch: ignore
</content>
</entry>
</feed>
