TransWikia.com

Emacs insane CPU load caused by org-superstar-mode

Emacs Asked by mor3dr3ad on September 2, 2021

if I try to open a fairly large file in emacs with org-mode enabled (loads of bullets and babel snippets), emacs uses an insane amount of cpu – my cpu is maxed out for 30 sec or so. I am running a spacemacs instance which I have extensively modified over the years.

I have found the culprit via profiler-report (see below). org-superstar-mode seems to use a lot of resources. however, I find no way of disabling it. i also do not remember installing or enabling it (does it ship with org-mode?)

So, 3 questions:

  • has someone else experienced this behaviour
  • any hints on exploring the cause of high cpu load further?
  • hints on disabling superstar-mode?
  - funcall-interactively                                       49485  97%
   - #<lambda 0x14898bcabbc69a1a>                               48160  94%
    - find-file                                                 48160  94%
     - find-file-noselect                                       48157  94%
      - find-file-noselect-1                                    48150  94%
       - after-find-file                                        48140  94%
        - normal-mode                                           48014  94%
         - set-auto-mode                                        47994  94%
          - set-auto-mode-0                                     47991  94%
           - org-mode                                           47991  94%
            - run-mode-hooks                                    44502  87%
             - apply                                            44502  87%
              - run-hooks                                       44502  87%
               - org-superstar-mode                             40013  78%
                - org-superstar--fontify-buffer                 39993  78%
                 - font-lock-ensure                             39973  78%
                  - jit-lock-fontify-now                        39973  78%
                   - jit-lock--run-functions                    39973  78%
                    - run-hook-wrapped                          39973  78%
                     - #<compiled 0x4010f3d>                    39973  78%
                      - font-lock-fontify-region                39973  78%
                       - font-lock-default-fontify-region              39973  78%
                        - font-lock-fontify-keywords-region              39932  78%
                         + eval                                 21488  42%
                         + org-fontify-meta-lines-and-blocks              16664  32%
                         + org-activate-links                     510   1%
                         + org-do-emphasis-faces                  458   0%
                           org-fontify-drawers                    116   0%
                           org-activate-code                       16   0%
                           org-activate-dates                      13   0%
                           org-activate-tags                       10   0%
                         + org-activate-footnote-links                  6   0%
                           org-font-lock-add-priority-faces                  6   0%
                           font-lock-prepend-text-property                  4   0%
                           org-fontify-macros                       3   0%

2 Answers

In the org-superstar-mode readme FAQ, they say slowdown can happen with this mode on because of "a deeper rooted issue involving fonts and font-lock reliant packages" and they recommend adding this to your init file if that's happening:

(setq inhibit-compacting-font-caches t)

Answered by J.Q. Whitcomb on September 2, 2021

That's a package available from melpa, so you can just uninstall it. Type M-x list-packages to list all available and installed packages. Search for org-superstar (C-s), hit d to mark the package for deletion, then x to execute the actions for all marked packages.

Answered by db48x on September 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP