Comment 7 for bug 598282

Revision history for this message
rgrig (radugrigore) wrote : Re: [Bug 598282] Re: command-not-found slow for its task

On Fri, Jul 22, 2011 at 3:03 AM, Zygmunt Krynicki
<email address hidden> wrote:
> While I appreciate your enthusiasm and desire to fix this I have a few

Actually, I don't have much of either. But thanks for your appreciation. :)

> 1) Unless I missed something your implementation always reads the whole database file, I would rather avoid that.

That's actually what makes it fast, so you should not avoid it. With
non-SSD one seek takes roughly the same amount of time as reading
sequentially a few MB; with SSD, it's fast anyway. GDBM has to
optimize behind the scenes to also read and cache the whole thing. (If
it doesn't, then that's what is slow.)

> 2) The similar result search you employed is much weaker than the one used by current implementation, you do not look for any permutations of the input string, just for substrings.

Look again.