On Tue, 19 Nov 2019 01:15:52 +0100, Guillem Jover wrote: > Hi!
Hola! And thanks for looking into this question. > > I've now come up with a first patch (pushed to git) which seems to > > work and which is not terribly slow. > > t/DpkgLists.t still passes and takes ~9 seconds; with the original > > _cat_lists() it was more like 2.5 seconds but well. > Hmm ouch, I didn't expect it to be that slow. Please note that t/DpkgLists.t runs 7 tests, so _cat_lists() is called 7 times; the speed loss per run is not so bad. > I've poked a bit, and > attached are some changes I've got locally that should shave a couple > of seconds. Will keep looking for further improvements. Cool, thanks. > But I guess > in the end dpkg-query is just doing more work, as it first needs to > parse the status db, build all the internal data structures, and then > build the output according to the format specified. Right, dpkg-query has to do more than the old implementation which just read the *.list files. > Maybe I need to look into making «dpkg-query --listfiles» require no > packages to dump the entire thing like in this case. But I'm not sure > how common this need is? But much of the involved work above would > still be done all the same, we'd just skip part of the formatting. I agree that it's probably not worth the effort, as this use case is a bit niche, and the speedup would probably be not that enormous. Cheers, gregor -- .''`. https://info.comodo.priv.at -- Debian Developer https://www.debian.org : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 AA06 `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe `- NP: Rolling Stones
signature.asc
Description: Digital Signature