Anton Vorontsov [2007-08-12 02:35]:
On Sat, Aug 11, 2007 at 05:10:12PM +0200, Tilman Sauerbeck wrote:
Tilman Sauerbeck [2007-08-09 01:16]:
over the last few days I have started working on the next major incarnation of pkgutils, version 6.
I was bored earlier today and compared the run times and memory usage of "pkginfo -i" from pkgutils-c 1.5 and the tip of the pkgutils6 branch.
I only ran each binary once, as I'm mostly interested in memory usage here (memory usage should be constant no matter whether you're running with a hot or a cold cache, whereas run time typically won't be).
Here's the graphs from valgrind resp. massif:
pkgutils-c 1.5: http://crux.nu/~tilman/pkginfo_i.1.5.png pkgutils6: http://crux.nu/~tilman/pkginfo_i.6.png
I'll leave the interpretation of these graphs to you ;)
I really doubt that you didn't know the reason:
Yes, I do know the reason. Hint: don't start your replies by implying ignorance. It doesn't really increase my willingness to give a thorough answer.
I.e. you're just reading package names in memory. So, you're using ad-hoc methods, and yes they're faster, eat less memory. While pkgutils-c's functions to the database done w/o premature optimizations:
I remember that you accused me of wasting memory. Guess in the pkginfo-i case it's you instead who's eating RAM alive. ...and that's the whole point of my previous mail. Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?