I'm using ESS (emacs speaks statistics) to edit R code. Once the R process is running, every textual edit in the buffer imposes substantial computational demand onto the R process (which I see top
in the terminal as an increase in the CPU load). Therefore when I'm constantly editing code the R process will have 100% usage (after around 30 seconds this raises the cpu temperature high enough for the fan to kick in). This seems to happen for any kind of edit, even for things like linebreaks that shouldn't really require cpu usage. Also the CPU load increases without actually evaluating any of the code; just the textual edits cause the increase in CPU load. Furthermore R stays perfectly responsive, my editing experience is the same as before (maybe around a week ago), except for the fan turning on after a while. I tried using Rprof
to see which ess functions get called from ESS, but entering/removing linebreaks (which is already enough to drive up the CPU usage) does not seem to call any .ess
functions (i'm not using eglot
/lsp-mode
, and the issue is also present with company-mode
and font-lock-mode
turned off). Any ideas what might be going on here?
Add a comment
|
1 Answer
it turned out the CPU loads were caused by flymake
, which seemed to create an R process with every edit (found out after seeing high cpu loads even with no R process running). Since I don't use flymake anyways, (setq ess-use-flymake nil)
solves my problem.