Control: tags -1 + wontfix
2004-09-09 18:27 Dan Jacobson:
Package: aptitude Version: 0.2.15.2-1 Severity: wishlist If you get spare time, one day soup-up aptitude so it is as fast as the competition: $ time apt-cache show lsb>&- real 0m0.012s user 0m0.007s sys 0m0.005s $ time aptitude show lsb>&- real 0m1.265s user 0m1.202s sys 0m0.062s
I've been spending some time optimizing several things as part of 0.7.7. aptitude is much more complex than apt-get in the sense than it links to many more libraries, has curses interface (same binary), etc; not even talking about apt-cache that does even less. Additionally, there are many features from aptitude that are used in "show", like: showing debtags, user-tags, and this needs to read the debtags DB and other things, which makes things slower. "show -v" shows several version of the package, so it has to scan further. There are aptitude-specific features on top of that, e.g.: - checking if the package is "Automatically installed" (feature which apt has now in another database, that apt-cache doesn't seem to read so "apt-cache show" doesn't include) - "Forbidden", etc. - or the fact that "aptitude show" works with patterns So comparing the two without having into account the extra features doesn't really make sense, we are not going to remove the extra features to improve the times anyway. Lastly, the comparison is showing a simple case where the package does not exist or is virtual. The times are very different and the gap much smaller for cases with the (newer) "apt" interface when matching packages with variable names (even if aptitude continues to do more things in this case): $ time apt show aptitude-commo. >&- WARNING: apt does not have a stable CLI interface. Use with caution in scripts. real 0m0.417s user 0m0.412s sys 0m0.000s $ time aptitude show ~n^aptitude-common$ >&- real 0m0.670s user 0m0.640s sys 0m0.024s ... so in summary, the comparison was apples with oranges, when it's apples and apples the difference is not very high. And I don't think that it's worth spending time optimising for cases which take less than a second anyway, there are many other priorities in aptitude right now (and have been for a long time), so marking as +wontfix. Cheers. -- Manuel A. Fernandez Montecelo <manuel.montez...@gmail.com>