Hi! On Thu, 2012-06-07 at 01:25:07 +0200, Benjamin Drung wrote: > Package: dpkg-dev > Version: 1.16.1.2ubuntu7 > Severity: normal > File: /usr/bin/dpkg-vendor
> dpkg-vendor is small useful program that is used by different other > programs. It should be fast, but actually is quite slow. > 'dpkg-vendor --query Vendor' takes 40 ms on a recent fast machine > (Core i5-2400S) with a hot cache and 230 ms on an Intel Atom netbook. > > As comparision, the Python version of distro-info took 28 ms, the Haskell > version 2.5 ms and the final C version only 0.7 ms on the recent fast > machine. distro-info probably has a similar complexity as dpkg-vendor > and therefore dpkg-vendor should be faster. On my system the following minimal test perl script takes (with a hot cache) around 6ms: ,--- #!/usr/bin/perl 1; `--- And the following one in contrast takes around 14ms: ,--- #!/usr/bin/perl use warnings; use strict; 1; `--- The call «dpkg-vendor --query Vendor» takes around 55ms. So, while this could certainly be improved in the perl code base, and patches improving the performance would be appreciated, I'm honestly failing to see how that's too slow really, or how this is something that should distract attention from other things. If this script is being called in a loop or a ton of times during the build process then something is very wrong somewhere else, and the queried value should get cached instead or something by the caller. Rewritting this in say C, does not seem either really appealing at this point. Given the above I'm going to be marking this wontfix and closing if no compelling reasons are given. thanks, guillem -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

