[PATCH] fields.c: Avoid unnecessary translations for error messages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] fields.c: Avoid unnecessary translations for error messages

Niels Thykier
Hi,

Attached patch reduces the "start up" time of dpkg-query by 10% to 20%
(depending on whether you run it under C-locale or not).  On a system
with about ~1.4k packages installed (and a non-C locale), this is the
difference between ~0.050s to ~0.040s per dpkg-query call.

Thanks for considering,
~Niels


0001-fields.c-Avoid-unnecessary-translations-for-error-me.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] fields.c: Avoid unnecessary translations for error messages

Guillem Jover
Hi!

On Sun, 2017-04-02 at 13:43:00 +0000, Niels Thykier wrote:
> Attached patch reduces the "start up" time of dpkg-query by 10% to 20%
> (depending on whether you run it under C-locale or not).  On a system
> with about ~1.4k packages installed (and a non-C locale), this is the
> difference between ~0.050s to ~0.040s per dpkg-query call.

Thanks! Although as mentioned on IRC at the time, I'd rather turn the
error message inside-out, so that they only trigger on error
conditions. I should have a branch somewhere refactoring part of this
already, will include it in 1.19.x.

Thanks,
Guillem

Loading...