[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [STUMP] longer startup times
From: |
J. Liles |
Subject: |
Re: [STUMP] longer startup times |
Date: |
Sun, 12 Aug 2007 11:15:58 -0500 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
> Start-up time of StumpWM has increased by 4 times and its
> response-time to prefix-key is twice much of what it usually takes.
> this is not then end, it is running very slow, taking lots of times to
> respond to my keys.
>
> then i found the culprit in "~/.stumpwmrc":
>
> ;; hook begins
> ;;
> ;; hook from "male" at IRC channel #stumpwm
> ;; this will show the curent group name when you will switch the group
> ;; (defun focus-group (newg oldg)
> ;; (declare (ignore oldg))
> ;; (message ":: ~a ::" (group-name newg)))
>
> ;; (add-hook *focus-group-hook* 'focus-group)
> ;;
> ;; hook ended
>
>
> this hook caused my StumpWM to run very slow like a tired old man. i
> commented it and now StumpWM runs fine as usual. i posted it here
> because i am still not able to find out why this hook caused the
> problem in 1st place ?
>
> any ideas ?
Sorry, I should have pointed out the fact that hooks are
non-exclusive. In your usage, the hook will be added to the
list every time you run "loadrc", resulting in (focus-group)
being called many times. Use the following macro instead of
(add-hook):
(defmacro replace-hook (hook fn)
`(remove-hook ,hook ,fn)
`(add-hook ,hook ,fn))
(replace-hook *focus-group-hook* 'focus-group)
Now you can call (replace-hook) for any other hooks in your
.stumpwmrc.