emacs-devel
[Top][All Lists]
Advanced

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

Memory problems update (was: Implementing image support for kitty termin


From: Jose Antonio Ortega Ruiz
Subject: Memory problems update (was: Implementing image support for kitty terminal)
Date: Thu, 22 Sep 2022 18:31:36 +0100

On Fri, Sep 09 2022, Po Lu wrote:

> Jose A Ortega Ruiz <jao@gnu.org> writes:
>
>> After 4-5 days of continous use, a graphical emacs is consuming around
>> 2Gb for me, sometimes 3Gb; emacs-nox+kitty, combined, with the same
>> workload except displaying images, is under 500Mb.  foot is even
>> slimmer.
>
> And what is allocating that much memory?  Sounds like a bug to me.  A
> leak was recently fixed, could you please try again?

I finally did, and, under X11 (non-toolkit build), things have indeed
improved drastically.  With my full configuration, Emacs went down to
allocating "only" ~100Mb per day with that fix.  Then, just on a whim, i
tried to disable a trick i use to hide the modelines, by altering their
faces like this (yes, it's a dirty hack, and i'm probably missing a
better way):

    (let ((bg (frame-parameter nil 'background-color))
          (ol "burlywood3")
          (ul "grey65"))
      (set-face-attribute 'mode-line nil :box nil :height 1
                          :background bg :foreground bg
                          :overline ol :underline ul :extend t)
      (set-face-attribute 'mode-line-inactive nil :box nil :height 1
                          :background bg :foreground bg
                          :underline ul :extend t)))

now, when i do *not* use the above code, extra RAM per day goes down
from 100Mb to less than 20Mb.  Does that make any sense?  Maybe it's a
red-herring.

So, in X11, i am much happier: things stabilise at around 700Mb, with
only small increments, and i can also see Emacs returning memory to the
system every now and then.  

Unfortunately, the situation with the pgtk build has not improved at
all.  I actually think it's gone worse since i last tried: a pgtk emacs
running in wayland (i've tried with sway and river) goes up to a 2Gb
footprint in just a couple hours of use (and shows no sign of stopping).
So there i stick to tty emacs in kitty or foot (BTW, i think the bug fix
you mention above also affected tty emacs, because it's also consuming
around 25% less memory than it used to).


Thanks,
jao
-- 
A student came to the master and asked, for the master was one of them
who knew such things: "Does Emacs have the Buddha nature?" The master
contemplated this for some time, and answered: "I don't see why not,
it has about everything else."



reply via email to

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