emacs-devel
[Top][All Lists]
Advanced

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

Re: Memory problems update (was: Implementing image support for kitty te


From: Eli Zaretskii
Subject: Re: Memory problems update (was: Implementing image support for kitty terminal)
Date: Sat, 24 Sep 2022 09:25:31 +0300

> From: Jose A Ortega Ruiz <jao@gnu.org>
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> Date: Fri, 23 Sep 2022 23:01:28 +0100
> 
> On Fri, Sep 23 2022, Eli Zaretskii wrote:
> 
> >> From: Jose Antonio Ortega Ruiz <jao@gnu.org>
> >> Cc: emacs-devel@gnu.org
> >> Date: Thu, 22 Sep 2022 18:31:36 +0100
> >> 
> >>     (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.
> >
> > When you change attributes of a named face, Emacs needs to recompute
> > all the faces on that frame, cache them, and redisplay the frame.
> > That definitely consumes memory, and could affect the ability of
> > glibc to return memory to the OS.
> 
> That's fair, but i typically only change those attribitues once, at
> startup, and almost never create new frames, so in principle emacs will
> only allocate that extra memory once, won't it?

Yes.  I thought you did that more frequently.

So now I have no idea how the above can explain your larger memory
footprint.



reply via email to

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