[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs memory management and sluggishness

From: Óscar Fuentes
Subject: Re: Emacs memory management and sluggishness
Date: Sun, 28 Jul 2019 01:52:19 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> Since my previous message RSS increased 30 MB.
> So I guess we have a memory leak somewhere.  Not sure if we have good
> ways of finding them.  I think I'd suggest to update to the latest
> master, and then track your memory footprint, waiting for the problem
> to happen and taking notes of what features you invoke.  Once the
> problem happens again, it would be good to know which features were
> activated and which commands invoked since the last checkpoint, so we
> could look into what these features/commands do.

It occurred to me to take a look at M-x list-timers and it showed about
700 (seven hundred) of them. The most frequent was about 300 repetitions

   *       0.05        t aggressive-indent--indent-if-changed

which is created by aggressive-indent-mode, that I use on a subset of my
buffers, then several dozens of

   *       0.50        t pdf-cache--prefetch-start

which comes from pdf-tools, and dozens of

        6467.37        - password-cache-remove

(the Next number varies, of course). So I used cancel-function-timers to
get rid of all the instances of those 3 examples and the lag while
typing text went away. Then, on new Emacs sessions (both with -Q and
with my config) tried to replicate the accumulation of
aggressive-indent--indent-if-changed without success.

Then noticed that everytime I fetch news & email with Gnus 6 new
instances of password-cache-remove are added. I checked that this
behavior is present since at least emacs 26.1. It makes little sense to
me, but those timers will eventually expire. Why the other timers
accumulate, don't know.

Is it possible that the huge RAM usage is related to the existence of
those hundreds of timers?

Now I'll do what you advised: fresh build, fresh instance and watch for
memory (and timers) increase.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]