From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Memory problems update (was: Implementing image support for kitty terminal) Date: Fri, 23 Sep 2022 08:33:31 +0300 Message-ID: <83o7v6r6xg.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9221"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Jose Antonio Ortega Ruiz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 23 07:42:07 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 1obbRu-0002HU-Tc for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Sep 2022 07:42:07 +0200 Original-Received: from localhost ([::1]:36968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obbRt-0004T0-LO for ged-emacs-devel@m.gmane-mx.org; Fri, 23 Sep 2022 01:42:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbJi-000890-2B for emacs-devel@gnu.org; Fri, 23 Sep 2022 01:33:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47622) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbJh-0000yF-Hg; Fri, 23 Sep 2022 01:33:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=a7vA6RrOJHQ8oY0mRxpLOyiVFhF9ed6a4Rxac9Z9Ls0=; b=YsLs+0/TllV8 9rL/vuP6thi2J9gxQ1gQTqw6V4GlwT/DXMa8siEgsi5bZwY7Gy4o2F8qPWtIdoO/V4i3cZPv23u3A bBl3cTmFi0gIcxfLsowpwWRInWqqzT+Sy+sr2+VzYPEUfdMMz67rFDNlOvH5u1C2W+jJ/P5pRREFQ Y5iLb0RiPp77Hle7Rs0tV3nc8re6Cuhb4kvYj7Z++6+dMImrS1rT+cwzSuFszxvAAu/i7pa1x62Rg SESTD8fkwuFT9CV9TF61ONQJnC0ENkSbqvMM67eMmtJOZ838b1XO/PmHKcJb3WjXc9vmkzNpYd6Lo rX7ZSFkUgKIUn0hQPijWqA==; Original-Received: from [87.69.77.57] (port=2924 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obbJO-0007Df-Vk; Fri, 23 Sep 2022 01:33:26 -0400 In-Reply-To: <87v8pfwc1z.fsf@mail.jao.io> (message from Jose Antonio Ortega Ruiz on Thu, 22 Sep 2022 18:31:36 +0100) 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:296021 Archived-At: > 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.