-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emacs uses CPU when this mode is enabled #53
Comments
The problem comes from the timer. Currently I'm experimenting with an idle timer instead. By the way, this code:
probably should be:
|
Nice. PR is welcome :D |
This is perhaps tangentially related, but I wonder why in (setq mini-modeline--timer (run-with-timer 0 0.1 #'mini-modeline-display)) and then we are checking if we actually have the right update interval in when (or (memq arg '(force clear))
(mini-modeline--overduep mini-modeline--last-update
mini-modeline-update-interval)) Wouldn't it make more sense to call (setq mini-modeline--timer (run-with-timer 0 mini-modeline-update-interval #'mini-modeline-display)) directly and get rid of the |
@slotThe, when using an idle-timer, as in #57, I believe it makes more sense to do this kind of check, since the idle timer can fire kind of whenever. But then again, if |
Indeed, I think with an idle timer—which seems like the best solution anyways—it would make sense again |
FWIW I use this modification along with the following config and mini-modeline works quite smooth on my machines, without any flickering (that's why I suppress some mostly useless error signals) or noticeable UI slowdowns (the don't pause redisplay). I am not sure about CPU usage because I tend to run lots of stuff in emacs/EXWM so some cpu usage is expected. Haven't yet investigated if / how it can be reduced.
|
First of all: very nice package, thank you!
I noticed that with this mode active Emacs uses ~1-2% of one CPU core when sitting idle. I tried setting
mini-modeline-update-interval
to a larger value (0.3), but that had no effect.The text was updated successfully, but these errors were encountered: