From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jose A Ortega Ruiz Newsgroups: gmane.emacs.devel Subject: Re: Memory problems update (was: Implementing image support for kitty terminal) Date: Fri, 23 Sep 2022 23:01:28 +0100 Message-ID: <875yhdu4w7.fsf@mail.jao.io> References: <87v8pz18wf.fsf@mail.jao.io> <83o7vrgimc.fsf@gnu.org> <87wnafdnee.fsf@logand.com> <835yhzgdyi.fsf@gnu.org> <87k06den1s.fsf@logand.com> <87illxy5ir.fsf@mail.jao.io> <87sfl1d1wi.fsf@logand.com> <87czc5y1wp.fsf@mail.jao.io> <871qsl8gt4.fsf@yahoo.com> <87v8pfwc1z.fsf@mail.jao.io> <83o7v6r6xg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37968"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 00:29:43 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1obrB1-0009nL-MR for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 00:29:43 +0200 Original-Received: from localhost ([::1]:53060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obrB0-0007mo-3l for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Sep 2022 18:29:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqjk-0005oO-2r for emacs-devel@gnu.org; Fri, 23 Sep 2022 18:01:33 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:34128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqjj-0001Dy-Pz; Fri, 23 Sep 2022 18:01:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=PxsllSdftUw3jojMHgmqJBkg7kWU9CmgMG6QSqAUQbk=; b=U2+MdHm4eRDkp0GMHjDx ljxV6c4Kb4DhNAH7WXLoYUmCF70Rpoa9DWyVPbeKpw4Etf0XLJhjs0W+Oo9Yn2U6LYNaBpC9zaRiL 2WFyt+ydjaAnrO9xq33Ht8zicyHuXSLOAhFn8tBhpC/vWJbwBLWL0nIxZ7ke2zai0vkPxyr/Ksarb jQNYOxY1WNLv3ymyUK948TWemlp12xZ4F0PKpF0nQEQf1JqiPOWji88S+vhXsMtZjHK6Q+2MPj0/G VhohilpRAw14kdJYoqDAGu3pVqEexZaC6rTktezpYWZo0E3LB3VC1/uT/ok6AurPzREFLiCrpUU44 3KQKC54yG4kyMQ==; Original-Received: from cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net ([92.233.85.247]:59276 helo=rivendell.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obqjj-0000mU-3Z; Fri, 23 Sep 2022 18:01:31 -0400 Original-Received: from localhost (rivendell.localdomain [local]) by rivendell.localdomain (OpenSMTPD) with ESMTPA id 558cf254; Fri, 23 Sep 2022 22:01:28 +0000 (UTC) In-Reply-To: <83o7v6r6xg.fsf@gnu.org> X-Attribution: jao X-Clacks-Overhead: GNU Terry Pratchett X-URL: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:296099 Archived-At: On Fri, Sep 23 2022, Eli Zaretskii wrote: >> From: Jose Antonio Ortega Ruiz >> 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?