emacs每5秒悬挂一次,许多缓冲区打开

发布于 2025-01-22 04:42:10 字数 2322 浏览 0 评论 0 原文

我遇到了一个问题,其中有许多缓冲区打开的结果在emacs中逐渐悬挂在一次缓冲区时,每5秒都完全悬挂。我更喜欢开放这些缓冲区供 https://github.com/alphapapapa/alphapapa/org-rifle /a> - 但我已经确认减少开放缓冲区的数量使此问题不引人注目。

我已经尝试通过将自动式空间间隙设置为大数字来更改自动保存,并启用自动save-save-visited mode 。我还关闭了公司模式 org-evil 。这些都没有改变。

运行CPU/MEM配置文件并没有透露任何有趣的东西,除非我缺少某些内容: 内存:

  1 + timer-event-handler                                     103,073,519  53%
  1 + command-execute                                          42,896,933  22%
  2 + company-post-command                                     28,962,855  14%
  3 + redisplay_internal (C function)                          13,816,595   7%
  4 + org-evil--post-command                                    5,206,152   2%
  5 + evil-repeat-post-hook                                        55,576   0%
  6 + evil-repeat-pre-hook                                          5,184   0%
  7   evil--jump-handle-buffer-crossing                             2,112   0%
  8 + undo-auto--add-boundary                                       1,056   0%
  9 + evil-esc                                                        192   0%
 10 + eldoc-schedule-timer                                             48   0%
 11   ...                                                               0   0%

CPU:

  1 + timer-event-handler                                            2594  71%
  1 + command-execute                                                 730  20%
  2 + ...                                                             200   5%
  3 + company-post-command                                             53   1%
  4 + redisplay_internal (C function)                                  41   1%
  5 + org-evil--post-command                                           17   0%
  6 + evil-repeat-post-hook                                             1   0%
  7 + evil--jump-hook                                                   1   0%

我的点emacs config是

我还能做些什么来诊断这种滞后?

I'm running into an issue where having many buffers open results in emacs briefly hanging exactly every 5 seconds while typing into a buffer. I prefer to have these buffers open for use of https://github.com/alphapapa/org-rifle - but I've confirmed that reducing the number of open buffers makes this issue not noticeable.

I've tried changing auto save by setting auto-save-interval to a large number, as well as enabling auto-save-visited-mode. I also turned off company-mode and org-evil. None of these have made a difference.

Running a cpu/mem profile didn't reveal anything interesting, unless I'm missing something:
Memory:

  1 + timer-event-handler                                     103,073,519  53%
  1 + command-execute                                          42,896,933  22%
  2 + company-post-command                                     28,962,855  14%
  3 + redisplay_internal (C function)                          13,816,595   7%
  4 + org-evil--post-command                                    5,206,152   2%
  5 + evil-repeat-post-hook                                        55,576   0%
  6 + evil-repeat-pre-hook                                          5,184   0%
  7   evil--jump-handle-buffer-crossing                             2,112   0%
  8 + undo-auto--add-boundary                                       1,056   0%
  9 + evil-esc                                                        192   0%
 10 + eldoc-schedule-timer                                             48   0%
 11   ...                                                               0   0%

CPU:

  1 + timer-event-handler                                            2594  71%
  1 + command-execute                                                 730  20%
  2 + ...                                                             200   5%
  3 + company-post-command                                             53   1%
  4 + redisplay_internal (C function)                                  41   1%
  5 + org-evil--post-command                                           17   0%
  6 + evil-repeat-post-hook                                             1   0%
  7 + evil--jump-hook                                                   1   0%

My dot emacs config is https://github.com/esmongeski/dotfiles/blob/main/dotEmacs.org

What else can I do to diagnose this type of lag?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

相守太难 2025-01-29 04:42:10

This was caused by garbage collection - https://www.gnu.org/software/emacs/manual/html_node/elisp/Garbage-Collection.html#:~:text=Emacs%20provides%20a%20garbage%20collector,still%20accessible%20to%20Lisp%20programs has details on how to tune it.

Update - I was on emacs 27.x, and upgrading to 28.x fixed up the lag with the memory leak.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文