I noticed that Emacs was hitting my CPU pretty heavily and traced the problem back to a lingering nyan-animation-timer that was spinning despite my having disabled nyan-mode.
Steps to reproduce
Emacs version 26.3, nyan-mode 1.1.2
Start up top, or your favorite CPU monitor.
Start emacs -Q -l nyan-mode.el
M-x nyan-mode
Watch the emacs process use some CPU but quiet down to minimal usage (basically nothing on my laptop, just a few spikes every now and then).
Watch the emacs process start consuming CPU. >3% on my laptop, though up to way more if I enable other heavyweight mode line constructs.
M-x nyan-mode (disable nyan-mode)
Watch the emacs process continue to consume CPU. >2% on my laptop, though still a lot if I enable other mode line constructs.
M-x nyan-stop-animation
Watch the process go back down to minimal CPU usage.
Expected behavior
CPU usage should stop when disabling nyan-mode.
Analysis
After step (9) above, M-x list-timers shows that the nyan-animation-timer is still spinning. This forces an expensive mode-line update every second. The problem is that the timer only gets canceled through customizing nyan-animate-nyancat, not through disabling the actual mode.
I noticed that Emacs was hitting my CPU pretty heavily and traced the problem back to a lingering nyan-animation-timer that was spinning despite my having disabled nyan-mode.
Steps to reproduce
Emacs version 26.3, nyan-mode 1.1.2
Expected behavior
CPU usage should stop when disabling nyan-mode.
Analysis
After step (9) above, M-x list-timers shows that the nyan-animation-timer is still spinning. This forces an expensive mode-line update every second. The problem is that the timer only gets canceled through customizing nyan-animate-nyancat, not through disabling the actual mode.