0

After upgrading emacs from 24.4 to 26.3 on Windows, everything works fine except for one thing: the list-packages window has become horribly slow. Like, the cursor moves one second after the keystroke.

I have upgraded all packages (despite the sluggishness of the interface) and also tried (byte-recompile-directory "~/.emacs.d/elpa" 0 t) but the situation has not improved.

Any idea?

These are the profiler's results (entered list-packages and moved the cursor around a bit):

- command-execute                                                 140  71%
 - call-interactively                                             140  71%
  - funcall-interactively                                          94  47%
   - execute-extended-command                                      47  23%
    - sit-for                                                      46  23%
       redisplay                                                   45  22%
    - command-execute                                               1   0%
     - call-interactively                                           1   0%
      - funcall-interactively                                       1   0%
       - profiler-report                                            1   0%
        - profiler-report-cpu                                       1   0%
           profiler-cpu-profile                                     1   0%
   - next-line                                                     47  23%
    - line-move                                                    47  23%
       line-move-visual                                            46  23%
  - byte-code                                                      46  23%
   - read-extended-command                                         46  23%
    - completing-read                                              46  23%
     - completing-read-default                                     46  23%
        read-from-minibuffer                                       46  23%
+ ...                                                              57  28%

...after a bit of bisecting my .emacs, I've found that the offending line is this one:

(set-face-attribute 'default nil :height 120 :family "Inconsolata" :foundry "outline"))

if I remove this, list-packages is back to normal. But why? Also, I like Inconsolata :-)

Meanwhile I've also discovered that org-mode becomes very slow if unicode symbols are visible (but not if they are hidden inside a collapsed headline); I suspect this is related.

7
  • Open the list-packages buffer, then type M-x profiler-start RET cpu RET and spend a short while doing (only) the things which are slow, then M-x profiler-report RET and C-u RET to expand the results. Copy and paste that back into the question. M-x profiler-stop to stop it from gathering more data, and M-x profiler-reset to purge the existing data.
    – phils
    Sep 10, 2019 at 23:36
  • It looks like you've profiled a lot of M-x activity (which seems expensive for some reason). I'm not sure if that was entirely due to M-x profiler-report, but you might try to eliminate that (perhaps bind a key to profiler-report). Be sure to profiler-reset before gathering data. Otherwise, see whether disabling C-h v line-move-visual has any noticeable effect on performance?
    – phils
    Sep 11, 2019 at 11:05
  • 2
    As you narrowed this to a font issue, and you're running on Windows, does (setq inhibit-compacting-font-caches t) help? I'm asking because this happened a few days ago: git.savannah.gnu.org/cgit/emacs.git/commit/etc/… and the variable was introduced in 25.2, and you're coming from 24.4; so it seems worth testing.
    – phils
    Sep 11, 2019 at 22:50
  • 2
    Yes! (setq inhibit-compacting-font-caches t) solves the problem. thanks! Sep 12, 2019 at 11:15
  • 1
    I suggest that we close this as a duplicate of unicode.txt slowness
    – phils
    Sep 13, 2019 at 1:31

0

Browse other questions tagged or ask your own question.