pscl4rke / launchbear

An application-launching framework.
GNU General Public License v3.0
1 stars 0 forks source link

Launchbear is really slow #1

Open pscl4rke opened 12 years ago

pscl4rke commented 12 years ago

I mean, not slow as in really slow, but it does take a second or two to bring up dmenu, and longer straight after a boot.

It would be great if this were responsive.

pscl4rke commented 12 years ago

Solving this is probably a two-parter:

  1. Launch dmenu first, and then worry about prepare the choices and piping them in. This might make it slightly faster. More importantly, it might give the user a chance to start typing without the keystrokes getting lost, making it feel more responsive. However I would have to experiment to see if dmenu actually behaves in this manner.
  2. Implement caching. This assumes that the majority of choices won't change very often, but I think that is a safe assumption for most users. We could allow backends to specify their own expiry periods.

Other options include a general analysis of the code for inefficiencies, and maybe running backends in parallel.

pscl4rke commented 12 years ago

Sadly, option 1 above doesn't work. Dmenu waits for the end of the stream (Ctrl-D etc) before it appears on the screen.

Looks like it'll have to be cache based. I'm working on something, but it's pretty hacky ATM.