[Bug 598282] Re: command-not-found slow for its task

2011-07-24 Thread Iain Buclaw
Hi, thanks your your sudden enthusiasm of my report. I wrote the script somewhat 2 years ago now as a proof of concept, and I've never had the need for spell checking feature in command-not-found. :~) I will see what I can do to help, though I am a bit stretched for time these days. Regards.

[Bug 598282] Re: command-not-found slow for its task

2011-07-23 Thread rgrig
I profiled your code (0.2.41ubuntu2) and on my computer the bottleneck is this statement: SourcesList() The slow part of that is that it reads the info files in /usr/share/python-apt/templates/ every time. And the slow part of that is that it tries to translate the descriptions. -- You

Re: [Bug 598282] Re: command-not-found slow for its task

2011-07-22 Thread rgrig
On Fri, Jul 22, 2011 at 3:03 AM, Zygmunt Krynicki zygmunt.kryni...@canonical.com 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

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread Launchpad Bug Tracker
** Changed in: command-not-found (Ubuntu) Status: New = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/598282 Title: command-not-found slow for its task To manage notifications

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread Zygmunt Krynicki
Feel free to help me out. The only issue why this app is slow is python startup time. A rewrite in C would make it much more responsive. NB: The app is _fast_ but not _responsive_. More than a year ago I did an experiment with c-n-f running as a daemon with a trimmed-down C program talking to it

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread Zygmunt Krynicki
I checked your script -- it does not seem to offer typo corrections - could you please add that feature (or disable it in c-n-f) and re- benchmark both? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu.

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread rgrig
See attached. Try tar xaf pkghint.tar.bz2 cd pkghint ./makedb.sh make Here are some times on my computer: rg@rqgm:pkghint$ time /usr/lib/command-not-found foobar foobar: command not found real0m0.204s user0m0.168s sys 0m0.032s rg@rqgm:pkghint$ time ./pkghint foobar foobar:

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread rgrig
Bugfix. Also, two warnings: - I didn't really think about what needs to go in the database. (In other words, makedb.sh is a complete hack.) - figuring out the active sources is also a hack, because I was lazy to fugure out how to use libapt from C; it may be worth using it unless it

[Bug 598282] Re: command-not-found slow for its task

2011-07-21 Thread Zygmunt Krynicki
While I appreciate your enthusiasm and desire to fix this I have a few comments: 1) Unless I missed something your implementation always reads the whole database file, I would rather avoid that. 2) The similar result search you employed is much weaker than the one used by current

[Bug 598282] Re: command-not-found slow for its task

2010-06-24 Thread Iain Buclaw
** Attachment added: Dependencies.txt http://launchpadlibrarian.net/50870215/Dependencies.txt -- command-not-found slow for its task https://bugs.launchpad.net/bugs/598282 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. --