Subject: Emacs uses excessive memory

From: Naveed Chehrazi <[email-masked]>
Date: Thu, 8 Oct 2020 19:53:02 -0500

Hi,

I had two instances where my emacs was using an excessive amount of memory
(once about 45GiB, and once using 94GiB). I have the memory-profiler report
below. It appears that helm package is the cause, however I was not able to
find out how I can report this issue to helm package maintainers. I would
appreciate it if you can provide instruction for resolving the problem.
Please also let me know if you need more information.

Best regards,

Naveed

OS:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04

emacs is installed via snap:
emacs                 27.1                   857   latest/stable
 alexmurray  classic

Output of memory profiler:
- command-execute                                          45,211,763  93%
 - call-interactively                                      45,211,763  93%
  - funcall-interactively                                  45,210,707  93%
   - helm-M-x                                              45,210,707  93%
    - helm-M-x-read-extended-command                       45,210,707  93%
     - helm                                                44,908,519  93%
      - apply                                              44,907,495  93%
       - helm                                              44,906,439  93%
        - apply                                            44,906,439  93%
         - helm-internal                                   44,906,439  93%
          - helm-read-pattern-maybe                        33,969,278  70%
           - read-from-minibuffer                          31,370,347  65%
            - timer-event-handler                          23,467,065  48%
             - apply                                       23,429,537  48%
              - #<compiled 0x155763cf6569>                 23,411,081  48%
               + helm-check-minibuffer-input               23,402,809  48%
               + internal--before-save-selected-window          4,136   0%
                org-ref-link-message                            8,216   0%
              + blink-cursor-start                              4,736   0%
              + helm-ff--cache-mode-refresh                     3,168   0%
              + show-paren-function                             1,280   0%
              + auto-revert-buffers                             1,056   0%
             + timer-activate                                  15,408   0%
             + timer-activate-when-idle                         9,504   0%
             + timer-inc-time                                   8,264   0%
               timer-until                                      1,120   0%
            + command-execute                                 592,496   1%
            + redisplay_internal (C function)                 157,944   0%
            + helm--update-header-line                         67,084   0%
            + helm-ff--cache-mode-reset-timer                  13,656   0%
            + #<compiled 0x155ca2e7d809>                       10,496   0%
            + minibuffer-inactive-mode                          4,224   0%
            + which-key--hide-popup                             3,168   0%
              beacon--vanish                                    2,112   0%
            + global-eldoc-mode-check-buffers                   1,056   0%
            + beacon--post-command                              1,056   0%
            + blink-cursor-end                                  1,056   0%
              tooltip-hide                                        160   0%
           + helm-update                                      643,349   1%
           + thing-at-point                                     3,122   0%
           + helm-get-candidate-number                          1,056   0%
          + helm-display-buffer                             5,484,524  11%
          + #<compiled 0x155763d0097d>                      3,540,114   7%
          + helm-execute-selection-action                   1,897,079   3%
          + helm-initialize                                    11,308   0%
          + advice-add                                          4,136   0%
        helm-parse-keys                                         1,024   0%
     + helm-make-source                                       297,820   0%
     + run-at-time                                                232   0%
+ timer-event-handler                                       2,638,134   5%
+ redisplay_internal (C function)                             236,482   0%
+ flyspell-post-command-hook                                   11,688   0%
+ preview-move-point                                            2,192   0%
+ helm-ff--cache-mode-reset-timer                               1,072   0%
  ...                                                               0   0%