Is there some way to find out, what in Emacs is causing spurious cpu usage?

Since a few days I notice Emacs retaining high CPU usage despite not being used actively, having no subprocesses, and not being in blocking state. M-: (all-threads) is empty, except for (current-thread). I also wasn't able to reproduce the issue across sessions.

I am using Emacs on Windows 10, so many unix tools will not be applicable.

  • 1
    Setting debug-on-quit and hitting C-g when Emacs is maxing CPU might give a hint. – npostavs Feb 27 '19 at 3:06
  • @npostavs – Sadly no. Whatever is using the CPU is doing it in a non-blocking manner. No hickups, that would indicate a time-window for pressing <kbd>C-g</kbd>. The only reason I noticed, was because the fan was spinning more than usual. – kdb Feb 27 '19 at 16:38
  • You can keep an eye on the Task Manager tray icon which would show when CPU usage is up. – npostavs Feb 27 '19 at 16:54
  • @npostavs I have encountered the issue again today. toggle-debug-on-quit and C-g don't trigger the debugger. And since the CPU usage has incrased, it remains constantly at "11%" (one of 8 cores). – kdb Mar 1 '19 at 19:13
  • "toggle-debug-on-quit and C-g don't trigger the debugger" - not at all? Are you didn't toggle debug-on-quit off by accident? – npostavs Mar 1 '19 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.