so-long (Mitigating slowness due to extremely long lines) is now in the Emacs master branch

在master分支上了 :kissing_heart: 下面是别人的测试结果:

The one_line.json file at performance - How do I prevent extremely long lines making Emacs slow? - Emacs Stack Exchange is a handy demonstration. The time until Emacs is responsive after visiting that file:

  1. Without so-long :
 $ time emacs -Q --eval "(setq large-file-warning-threshold nil)" --eval "(run-with-idle-timer 0.1 nil #'kill-emacs)" -- one_line.json
 
 real    3m25.785s
 user    3m25.058s
 sys     0m0.365s
  1. With so-long :
 $ time emacs -Q -f global-so-long-mode --eval "(setq large-file-warning-threshold nil)" --eval "(run-with-idle-timer 0.1 nil #'kill-emacs)" -- one_line.json
 
 real    0m0.890s  
 user    0m0.538s  
 sys     0m0.047s
4 个赞

Looks promising. 回头去试一试