Malabarba / smart-mode-line

A powerful and beautiful mode-line for Emacs.
894 stars 54 forks source link

high memory usage #260

Open dmvianna opened 1 year ago

dmvianna commented 1 year ago

I just ran some profiling during a session that lasted at most one hour, and look at this snippet from *Memory-Profiler-Report*:

  1,352,822,593  30% - redisplay_internal (C function)
  1,271,546,132  28%  - eval
  1,215,409,696  27%   - sml/generate-minor-modes
    540,554,008  12%    - rm--mode-list-as-string-list
     78,743,336   1%       rm--propertize
     61,872,480   1%     + rm-format-mode-line-entry
      2,491,104   0%       rm--remove-hidden-modes
    330,750,518   7%    + sml/fill-width-available
      2,925,800   0%      sml/count-occurrences-starting-at
     20,221,604   0%     sml/generate-modified-status
        727,628   0%   + eglot--mode-line-format
        383,566   0%   + sml/generate-buffer-identification-if-necessary
dmvianna commented 1 year ago

This is my setup:

(use-package smart-mode-line
  :init
  (progn
     (setq sml/theme nil
           sml/shorten-directory t
           sml/name-width 32
           sml/shorten-modes t)
           ;; sml/use-projectile-p 'before-prefixes
           ;; sml/projectile-replacement-format "%s/"

     (sml/setup)))

I installed via straight.el, the smart-mode-line release is 2.14.

dmvianna commented 1 year ago

I just opened emacs this morning and left it idle, and could track its memory usage growing while I left it idle. Then I commented out the above smart-mode-line configuration and restarted emacs. The memory footprint stopped growing. So there you go, we have a memory leak.

xparq commented 10 months ago

Just acting as a footnote-bot: May or may not be related to #257.