[T]o get attention from us, it is necessary to demonstrate the kind of attitude that leads to competence — alert, thoughtful, observant, willing to be an active partner in developing a solution.–Eric S. Raymond, How To Ask Questions The Smart Way
Like a lot of what ESR used to write, this is remarkably good advice- clearly written, straightforward, and demonstrating a lot of insight into how functional software communities work. Thankfully, lots of people still do as ESR says, not as ESR does. Here is a brief story about one such exchange.
In his recent infamous letter, ESR complained about yum’s performance. Not unreasonable; yum is slow. But we know that ESR is supposedly an expert hacker, and an expert in asking questions. So surely if he’d really meant to get the problem fixed and followed his own advice, his post could have looked something like this:
A bit more on yum performance.
“yum -C search foo” makes 1,536,713 system calls. Even though they’re almost all under a millisecond, that really adds up. You could rewrite it in straight assembler, and it would still be slow. Don’t blame Python, and don’t waste your time rewriting it in C until you figure out what the real cause is.
“apt-cache search foo” makes 1,254 system calls. The only one that takes over a millisecond is the call that reads all 7MB of srcpkgcache.bin. 8ms for that.
yum makes 372,776 reads, 372,115 lseeks, and 474,956 futex calls. apt-cache makes 912 reads and 23 seeks. And remember, apt-cache is dealing with 10x as many packages!
All praise strace.
It turns out that when you follow ESR’s advice write something useful and data-laden like this, instead of a publicity-seeking rant, then you get responses that look something like this:
So, after this dialogue Patrick contacted me offlist with some extremely helpful debug information and some code samples to help optimize a number of things.
Not the least of which is the above search method.
For a search of the word ‘foo’ the search went from taking 30s to taking 2s.
It’s a pretty massive improvement and I appreciate the guidance.
It is obviously sort of sad that it took ESR whining so loudly and publicly to encourage someone to do decent profiling work on a key piece of infrastructure; but all it took to get it fixed was one person who stopped whining and instead did the nitty-gritty work of profiling with a widely available tool. The outcome: a faster yum, and a great example of providing useful information and constructive guidance instead of whining.
So here is a great big thanks to all those people who quietly and often without reward do the real work of putting together our software, one email thread at a time. Those are the people who should be getting publicity and our attention, not the losers. Thanks, Patrick, Seth, and everyone else like you guys. May you too someday end up on lwn and /. ;)
(mild tangent, from looking at the jargon file for the first time in ages: how did things from little green footballs make their way into the jargon file? Stole my cultural heritage indeed.)