编辑的是 py 文件,里面注释是中文,使用 c-n 和 c-p 移动,以及 c-v 翻屏的时候,都会有卡顿的现象,使用 profiler 拿到的结果是 timer-event-handler 91%,更加详细的结果在下面。 有个疑问: 我现在知道是那个占用 CPU 高了,然后怎么办呢? 直接禁用? 还是有其他什么办法呢?
- timer-event-handler 38477 91%
- apply 38473 91%
- show-paren-function 38470 91%
- apply 38470 91%
- show-paren-function@fix-show-paren-function 38470 91%
- cond 38470 91%
- save-excursion 38470 91%
- condition-case 38433 91%
- progn 38433 91%
- backward-up-list 38433 91%
- up-list 38433 91%
- forward-sexp 38429 91%
- python-nav-forward-sexp 38425 91%
- python-nav--forward-sexp 38393 91%
- python-info-statement-ends-block-p 35922 85%
- python-nav-end-of-block 35382 84%
- python-nav-end-of-statement 31950 76%
- syntax-ppss 21122 50%
+ syntax-propertize 8 0%
- python-info-line-ends-backslash-p 8410 20%
syntax-ppss 8033 19%
+ python-nav-end-of-statement 969 2%
+ scan-lists 19 0%
+ python-nav-beginning-of-block 1871 4%
+ python-util-forward-comment 204 0%
+ python-info-current-line-empty-p 137 0%
python-info-current-line-comment-p 65 0%
+ python-nav-end-of-statement 402 0%
+ python-info-beginning-of-block-p 751 1%
+ python-info-end-of-block-p 379 0%
+ python-nav-beginning-of-statement 262 0%
+ python-nav-beginning-of-block 205 0%
+ python-info-end-of-statement-p 181 0%
+ python-info-beginning-of-statement-p 170 0%
+ python-syntax-context-type 164 0%
+ python-info-statement-starts-block-p 118 0%
+ python-nav--lisp-forward-sexp 117 0%
+ python-info-current-line-empty-p 49 0%
syntax-after 11 0%
python-util-forward-comment 7 0%
+ funcall 37 0%
+ timer-activate-when-idle 4 0%
+ command-execute 2187 5%
+ ... 1191 2%
+ redisplay_internal (C function) 28 0%
+ sp--save-pre-command-state 24 0%
company-post-command 11 0%
global-hl-line-unhighlight 9 0%
+ global-hl-line-highlight 6 0%