
Hi all, I recently upgraded xmonad / XMonadContrib, and now I have performance problem using ShellPrompt... ( response time whe typing) any idea? Lobzang

On Mon, Oct 15, 2007 at 05:37:05PM +0200, lobzang@free.fr wrote:
Hi all,
I recently upgraded xmonad / XMonadContrib, and now I have performance problem using ShellPrompt... ( response time whe typing)
ShellPrompt went over some refactoring recently, and knowing the version you are using (darcs, pulled when?) is important. Basically, there are 2 versions: the first one uses Readline - non too bad. I tried using bash compgen (also to remove the readline requirement), but with a vary bad performance. So I switched to the Haskell function getDirectoryContent, which is better in my system. My tests show that getDirectoryContet has a performance similar to readline, without the extra library requirement. I'm running a centrino laptop (at 1 Ghz) with 512 Mb of Ram. While the firefox open-with dialog takes 3 minutes to open /usr/bin/ ShellPrompt does it in 3-5 seconds which is not too bad. But I'm open to suggestion on how to improvement it. Andrea

Quoting Andrea Rossato
Hi all,
I recently upgraded xmonad / XMonadContrib, and now I have performance
On Mon, Oct 15, 2007 at 05:37:05PM +0200, lobzang@free.fr wrote: problem
using ShellPrompt... ( response time whe typing)
ShellPrompt went over some refactoring recently, and knowing the version you are using (darcs, pulled when?) is important.
using darcs today's version : http://code.haskell.org/XMonadContrib
Basically, there are 2 versions: the first one uses Readline - non too bad. I tried using bash compgen (also to remove the readline requirement), but with a vary bad performance.
So I switched to the Haskell function getDirectoryContent, which is better in my system. My tests show that getDirectoryContet has a performance similar to readline, without the extra library requirement.
I'm running a centrino laptop (at 1 Ghz) with 512 Mb of Ram. While the firefox open-with dialog takes 3 minutes to open /usr/bin/ ShellPrompt does it in 3-5 seconds which is not too bad. But I'm open to suggestion on how to improvement it.
well before ShellPrompt was fast as speed of light, now this is like dmenu :D
Andrea
_______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

On Mon, Oct 15, 2007 at 06:37:01PM +0200, lobzang@free.fr wrote:
well before ShellPrompt was fast as speed of light, now this is like dmenu :D
This is really bad, indeed. Attached there's the old version (which still works): could you please give it a try (it requires editing xmonad.cabal to add the readline dependency) and confirm that is that faster? Can you give me some more information about when you find this version more efficient. I would like to achieve that level of performance without having to rely on readline. Thanks for your help. Andrea

On Mon, 2007-10-15 at 19:13 +0200, Andrea Rossato wrote:
On Mon, Oct 15, 2007 at 06:37:01PM +0200, lobzang@free.fr wrote:
well before ShellPrompt was fast as speed of light, now this is like dmenu :D
This is really bad, indeed.
Attached there's the old version (which still works): could you please give it a try (it requires editing xmonad.cabal to add the readline dependency) and confirm that is that faster?
yep I confirm this is much faster :)
Can you give me some more information about when you find this version more efficient. I would like to achieve that level of performance without having to rely on readline.
sure
Thanks for your help.
Andrea _______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
Lobzang ___________________ http://lobzang.free.fr

lobzang:
On Mon, 2007-10-15 at 19:13 +0200, Andrea Rossato wrote:
On Mon, Oct 15, 2007 at 06:37:01PM +0200, [1]lobzang@free.fr wrote:
well before ShellPrompt was fast as speed of light, now this is like dmenu :D
This is really bad, indeed.
Attached there's the old version (which still works): could you please give it a try (it requires editing xmonad.cabal to add the readline dependency) and confirm that is that faster?
yep I confirm this is much faster :)
Can you give me some more information about when you find this version more efficient. I would like to achieve that level of performance without having to rely on readline.
sure
Thanks for your help.
Is it possible to include a benchmark script with xmobar that tests how long it takes to process a series of commands, so you know whether things are getting worse? -- Don

On 2007-10-15 17:17:19 Andrea Rossato wrote:
On Mon, Oct 15, 2007 at 05:37:05PM +0200, lobzang@free.fr wrote:
Hi all,
I recently upgraded xmonad / XMonadContrib, and now I have performance problem using ShellPrompt... ( response time whe typing)
ShellPrompt went over some refactoring recently, and knowing the version you are using (darcs, pulled when?) is important.
Basically, there are 2 versions: the first one uses Readline - non too bad. I tried using bash compgen (also to remove the readline requirement), but with a vary bad performance.
So I switched to the Haskell function getDirectoryContent, which is better in my system. My tests show that getDirectoryContet has a performance similar to readline, without the extra library requirement.
My up-to-date repo appears still to be using bash compgen. Is there a patch missing somewhere? /J

On Mon, Oct 15, 2007 at 11:51:07PM +0100, Jamie Webb wrote:
My up-to-date repo appears still to be using bash compgen. Is there a patch missing somewhere?
Well, the prompt uses bash to get directory completion (bash comepgen -A file). The real issue we are talking about is commandCompletionFunction. Now I'm going to write down some benchmark to compare the different approaches and have real numbers to reason with. Andrea

On 2007-10-16 08:32:44 Andrea Rossato wrote:
On Mon, Oct 15, 2007 at 11:51:07PM +0100, Jamie Webb wrote:
My up-to-date repo appears still to be using bash compgen. Is there a patch missing somewhere?
Well, the prompt uses bash to get directory completion (bash comepgen -A file). The real issue we are talking about is commandCompletionFunction.
Now I'm going to write down some benchmark to compare the different approaches and have real numbers to reason with.
I'm pretty sure bash (or readline?) caches the contents of $PATH and only re-checks the directory mtimes rather than doing the whole scan each time. It's only 3k odd entries on my box. Could ShellPrompt do the same? /J

I have noticed the same response time slowness with the current (darcs as of today) ShellPrompt. If I hold down a key for a couple seconds, the key continues to repeat for a while after the key is released. Also, xmonad uses 90% of my CPU (Pentium 4 3.40GHz) while the key is being held. This does not occur in SshPrompt. In Xmonad 0.3, holding a key in a ShellPrompt uses only 4% of my CPU.

On Monday 15 October 2007 10:37:05 lobzang@free.fr wrote:
Hi all,
I recently upgraded xmonad / XMonadContrib, and now I have performance problem using ShellPrompt... ( response time whe typing)
any idea?
Lobzang _______________________________________________ Xmonad mailing list Xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
We've made some improvements, does it feel responsive now? Cheers, Spencer Janssen
participants (7)
-
Andrea Rossato
-
Don Stewart
-
Jamie Webb
-
lithis
-
lobzang
-
lobzang@free.fr
-
Spencer Janssen