2016-11-24 99 views
2

我的Emacs(GNU Emacs的25.1.1(x86_64的-W64-的mingw32)的Windows 10 64位下)已成爲unusably緩慢和震盪,特別是在組織模式下,例如可以暫停2秒鐘以移動光標,並且3秒以上刷新以顯示展開的樹。Emacs的診斷:ORG-模式不能忍受緩慢且通常檔

基於我的基準,初始化報告,我已經在我的.emacs微調的內容,以減少需要和負載語句,它們改變成自動加載的鉤或負載的eval之後做了一些精簡。

我也完成了幾個探查報告,一些結果看起來對我來說很難解釋(如「線動視覺」使用大量內存),我不知道什麼包其中的一些下面的流程以及如何調整和改進以提高性能。下面是profiler-report(mem + cpu)的部分擴展輸出,在處理大約1500行的.org文件時,提前感謝!

(work.org at ~1500 lines) 
- command-execute           259,247,035 98% 
- call-interactively          259,247,035 98% 
    - funcall-interactively         259,142,758 98% 
    - previous-line          203,846,889 77% 
    - line-move           203,846,889 77% 
    - line-move-visual         92,655,384 35% 
     - posn-at-point           3,520 0% 
     file-remote-p           3,520 0% 
     window-inside-pixel-edges        12,844 0% 
    - org-cycle            46,120,698 17% 
    - org-cycle-internal-local        45,429,666 17% 
    - run-hook-with-args         45,176,010 17% 
     - org-optimize-window-after-visibility-change  41,890,667 15% 
     - org-subtree-end-visible-p       41,862,858 15% 
     - pos-visible-in-window-p       2,111,314 0% 
     - jit-lock-function         153,338 0% 
      - jit-lock-fontify-now        150,304 0% 
      - jit-lock--run-functions       135,144 0% 
      - run-hook-wrapped        135,144 0% 
      + #<compiled 0x2c09399>       135,144 0% 
      #<compiled 0x2cf3709>        15,160 0% 
      file-remote-p          18,898 0% 
     + eval             1,056 0% 
      org-end-of-subtree         1,056 0% 
     + recenter            21,840 0% 
     + org-cycle-hide-archived-subtrees      47,260 0% 
     org-cycle-show-empty-lines        9,232 0% 
     + org-cycle-hide-drawers         2,936 0% 
    + org-show-children          12,456 0% 
     outline-next-heading          5,120 0% 
    + org-show-entry           1,776 0% 
    + outline-flag-region          1,520 0% 
    + org-hide-block-toggle-maybe        114,356 0% 
    + run-hook-with-args-until-success       11,744 0% 
    + org-cycle-item-indentation        6,198 0% 
    + org-cycle-level           5,648 0% 
     org-at-table-p           5,312 0% 
    + execute-extended-command        8,947,699 3% 
    + next-line            227,472 0% 
    + byte-code             104,277 0% 
+ redisplay_internal (C function)       4,519,393 1% 
+ elscreen-run-screen-update-hook        17,698 0% 
    internal-timer-start-idle          8,137 0% 
+ timer-event-handler           2,000 0% 
+ eldoc-schedule-timer           1,056 0% 
    ...                0 0% 
+0

請參閱標題**新(快)的Emacs 25.1的測試生成適用於Windows **此相關的主題:https://www.reddit.com/r/emacs/comments/5drxs6/new_faster_testbuild_of_emacs_251_for_windows/?st=ivwrzcgk&sh= c742163f – lawlist

+0

我也應該檢查一下。我目前使用https://github.com/zklhp/emacs-w64上的zklhp構建它認爲它不會太壞。 – menuhin

+0

我用文森特·古萊特的Emacs的包捆在過去,而是「升級」後的相當一些性能問題出現了從Emacs的24 Emacs的25.1。所以我想試試zklhp的64位版本。 – menuhin

回答

2

我不知道這是否與你的問題,但我也對窗口極慢org-模式,構建議程時尤其如此。

我發現以下行解決這對我來說,將它添加到我的大org-模式文件時:

#+STARTUP: showeverything 
+0

這並沒有太大的幫助。但是,使用-q org-mode啓動時速度要快得多,但在正常啓動時僅添加的實際活動次要模式是這兩個(自動填充功能工具欄模式)。令人費解的是,這兩種模式如何降低性能。是否會有更多影響性能的因素/隱藏模式? – menuhin

5

我找到了包,可能是對組織模式在經濟放緩的主要原因我的Emacs。

這是包尚未更新爲2年以上,「ORG-子彈」。

通過我的.emacs文件中刪除了「需要」語句和所有後續相關設置,在我的Emacs的組織模式正在恢復與可用的響應能力的狀態。

+0

好的。 org-bullets是加載8000+條org_archive文件的一個重要因素。 8000+屬性抽屜的存在是另一大因素。禁用組織項目符號並刪除所有的PROPERTIES/END對(但留下實際的屬性行)會立即加載大文件。 –