gpt4 book ai didi

performance - Emacs 行号性能

转载 作者:行者123 更新时间:2023-12-01 11:42:08 30 4
gpt4 key购买 nike

我试过 linumnlinum .两者在 100k+ 行的文件上都有可怕的性能。

$ for x in {1.100000}; do echo $x; done > 100k.txt
$ emacs -q 100k.txt
M-x load-library linum
M-x linum-mode
M-> ;; it's not too bad to go to end of file
M-< ;; now this completely locks up emacs

joe 等编辑器相同的操作是瞬时的。

除了关闭大文件的行号(正是您要使用行号导航的文件类型 - 我记得在连接的 Javascript 文件中定位错误行)之外,还有其他解决方案吗?

或者只是使用不同的编辑器?

最佳答案

据我所知,即使您没有看到 linum 及其衍生的 nlinum 数字线。在 100k+ 行的情况下,如果对单个行进行编号需要超过十分之几毫秒,这可能会很慢。对我来说(Fedora 19,Emacs 24.3.1),没有明显的延迟。试试 line-num.el ,它只对当前可见的行进行编号,看看它是否解决了问题。

关于performance - Emacs 行号性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19157777/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com