I noticed Emacs was really laggy on any mode derived from prog-mode two days ago. Before that, everything was fine. I can navigate on a 1000+ lines org-mode file without problem, but I can't even type without lag on a 100- line of a C file, or a 50 lines Haskell file.
I have tried many things. I have disabled several modes to see if anything helps. It seems that disabling evil-mode helps, but doesn't solve it (and bare in mind, I use evil-mode on long org or LaTeX files without any lag).
I have also done the profiler on cpu (and memory, but only posted the cpu), and these are the results:
cpu:
- command-execute 80022 75%
- call-interactively 80022 75%
- funcall-interactively 79047 74%
- evil-scroll-line-up 77417 72%
- scroll-down 76489 71%
- jit-lock-function 76455 71%
- jit-lock-fontify-now 76455 71%
- apply 76455 71%
- ad-Advice-jit-lock-fontify-now 76455 71%
- #<compiled 0x267e7d> 76455 71%
- jit-lock--run-functions 76451 71%
- run-hook-wrapped 76451 71%
- #<compiled 0xef9bd7> 76451 71%
- highlight-indent-guides--guide-region 39739 37%
- font-lock-fontify-region 39674 37%
- font-lock-default-fontify-region 39671 37%
- font-lock-fontify-keywords-region 39645 37%
- eval 39636 37%
- if 39636 37%
- or 35672 33%
- elt 35672 33%
syntax-ppss 35140 33%
+ when 3402 3%
+ parse-partial-sexp 559 0%
+ font-lock-fontify-syntactically-region 11 0%
+ font-lock-unfontify-region 4 0%
syntax-ppss 48 0%
+ highlight-indent-guides--get-prev-guides 11 0%
+ highlight-indent-guides--guide-line 3 0%
- font-lock-fontify-region 36708 34%
- font-lock-default-fontify-region 36708 34%
- font-lock-fontify-keywords-region 36692 34%
- eval 36679 34%
- if 36673 34%
- or 36666 34%
- elt 36666 34%
syntax-ppss 36660 34%
+ parse-partial-sexp 7 0%
+ font-lock-fontify-syntactically-region 7 0%
+ font-lock-unfontify-region 3 0%
+ nlinum--region 4 0%
+ run-with-timer 4 0%
+ eval 34 0%
The modes I have on are:
- Async-Bytecomp-Package
- Auto-Compile-On-Load
- Auto-Fill
- Column-Number
- Diff-Auto-Refine
- Evil
- Evil-Commentary
- Evil-Leader
- Evil-Local
- Evil-Surround
- File-Name-Shadow
- Flyspell
- Global-Evil-Surround
- Global-Git-Commit
- Global-Nlinum-Relative
- Global-Undo-Tree
- Global-Yascroll-Bar
- Haskell-Indentation
- Helm
- Highlight-Indent-Guides
- Magit-Auto-Revert
- Nlinum
- Nlinum-Relative
- Override-Global
- Projectile
- Savehist
- Shell-Dirtrack
- Show-Paren
- Smart-Cursor-Color
- Tex-Pdf
- Undo-Tree
- Yas-Global
- Yascroll-Bar
If any more information is needed, I'll gladly provide, I don't know how to debug this very well.