]> git.saurik.com Git - apt.git/commit
debListParser: Micro-optimize AvailableDescriptionLanguages()
authorJulian Andres Klode <jak@debian.org>
Tue, 27 Sep 2016 22:05:31 +0000 (00:05 +0200)
committerJulian Andres Klode <jak@debian.org>
Tue, 22 Nov 2016 21:58:19 +0000 (22:58 +0100)
commitc0723bf1a60daf45096998d4ae9feee3c44343f8
tree5dfdfba820dbe501d1a6bf2fafbcba125facd027
parentf378b41f9ab2493bcbc5892d482b18826b0b84c0
debListParser: Micro-optimize AvailableDescriptionLanguages()

Generating a string for each version we see is somewhat inefficient.
The problem here is that the Description tag names are longer than
15 byte, and thus require an allocation on the heap, which we should
avoid.

It seems reasonable that 20 characters works for all languages codes
used for archive descriptions, but if not, there's a warning, so
we'll catch that.

This should improve performance by about 2%.
apt-pkg/deb/deblistparser.cc