莫名其妙的cpu占用 按j移动一点也不流畅啊

打开了个react项目 js文件也就80多行。我按j移动往下移动一点也不流畅。用的js-mode 。highlight-indent-guide也关了,这个打开更卡。nyan-cat也关了。。profiler-start 查了也看不出来什么东西。不知道这个gif能不能看出来可能会丢帧。

- command-execute                                          33,452,274  70%
 - call-interactively                                      33,437,490  70%
  - funcall-interactively                                  33,435,378  70%
   + counsel-M-x                                           23,375,573  49%
   + profiler-report-find-entry                             9,322,642  19%
   + handle-focus-out                                         328,524   0%
   + profiler-report-toggle-entry                             245,138   0%
   + evil-window-down                                          56,260   0%
   + evil-mouse-drag-region                                    39,621   0%
   + evil-next-line                                            39,392   0%
   + evil-switch-to-windows-last-buffer                        13,033   0%
   + handle-focus-in                                           11,625   0%
   + delete-window                                              2,978   0%
   + evil-goto-first-line                                         592   0%
- redisplay_internal (C function)                          13,549,391  28%
 - eval                                                    12,974,103  27%
  + doom-modeline-format--main                              5,037,000  10%
  - doom-modeline-segment--buffer-info                      1,253,950   2%
   - doom-modeline-update-buffer-file-state-icon              981,934   2%
    - file-exists-p                                           577,770   1%
     + ucs-normalize-hfs-nfd-pre-write-conversion             577,770   1%
    + doom-modeline-buffer-file-state-icon                    313,544   0%
     doom-modeline-propertize-icon                              3,168   0%
    doom-modeline-segment--buffer-encoding                    846,572   1%
    doom-modeline-segment--buffer-position                    777,272   1%
  + doom-modeline-segment--modals                             705,720   1%
  - doom-modeline-segment--major-mode                         645,008   1%
   - format-mode-line                                           8,184   0%
    - eval                                                      8,184   0%
       js--syntactic-mode-name-part                             8,184   0%
    doom-modeline-segment--matches                            263,032   0%
  + centaur-tabs-line                                         237,401   0%
    doom-modeline-segment--galaxy/time                        166,732   0%
  + doom-modeline-segment--checker                            114,120   0%
  + doom-modeline-segment--vcs                                 87,232   0%
    doom-modeline-segment--debug                               50,976   0%
  + doom-modeline-segment--lsp                                 36,896   0%
    doom-modeline-segment--input-method                        33,792   0%
    doom-modeline-segment--process                                256   0%
 + jit-lock-function                                          152,320   0%
 + doom-modeline-refresh-bars                                 114,408   0%
 + mode-line-default-help-echo                                 46,464   0%
 + menu-bar-update-buffers                                     35,888   0%
 + which-key--hide-popup-on-frame-size-change                  28,512   0%
 + #<compiled 0x140b6b0db8cfe500>                              28,512   0%
 + window--adjust-process-windows                              27,280   0%
 + xwidget-webkit-adjust-size-in-frame                         19,008   0%
 + lsp-ui-doc--hide-frame                                      14,784   0%
 + evil-refresh-cursor                                         12,672   0%
 + keymap-canonicalize                                          4,224   0%
 + +doom-dashboard-resize-h                                     3,168   0%
+ timer-event-handler                                         250,584   0%
+ evil-repeat-post-hook                                        40,864   0%
+ evil-repeat-pre-hook                                         35,320   0%
+ which-key--hide-popup                                        34,848   0%
+ #<compiled 0x14085254b063a44>                                34,560   0%
+ sp--save-pre-command-state                                   24,112   0%
+ tooltip-show-help-non-mode                                   16,852   0%
+ flycheck-display-error-at-point-soon                         16,160   0%
+ flycheck-help-echo                                           10,514   0%
+ undo-auto--add-boundary                                       4,224   0%
+ evil--jump-hook                                               2,304   0%
+ lsp--post-command                                             1,872   0%
  jit-lock--antiblink-post-command                              1,440   0%
+ solaire-global-mode-check-buffers                             1,056   0%
+ eldoc-schedule-timer                                          1,056   0%
  mouse-fixup-help-message                                      1,024   0%
+ mouse--click-1-maybe-follows-link                                40   0%
  ...                                                               0   0%

test1

推荐给你我的祖传配置

(setq auto-window-vscroll nil)

我发现我设置过这个啊

CPU看起来是doom-mode-line的问题,话说你这个配置真叼,移动个光标各种函数都要进来插一脚。

你看我的,只有 yascroll, highlight-symbol 和 smartparens

对啊我就很好奇。。。是我录制的顺序问题?

感觉除了自己配的配置以外很容易陷入性能问题。

是自己的配置啊。。。

逐步排查问题?比如说把mode-line去掉?

都是试过了的。按j往下一直 cpu就上去了。。