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: Sat, 24 Sep 2022 09:25:31 +0300 Message-ID: <83tu4xnvac.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> <83o7v6r6xg.fsf@gnu.org> <875yhdu4w7.fsf@mail.jao.io> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22841"; mail-complaints-to="usenet@ciao.gmane.io" Cc: luangruo@yahoo.com, emacs-devel@gnu.org To: Jose A Ortega Ruiz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 24 08:28:11 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 1obye2-0005lF-MF for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 08:28:10 +0200 Original-Received: from localhost ([::1]:42232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1obye0-0006XS-Sl for ged-emacs-devel@m.gmane-mx.org; Sat, 24 Sep 2022 02:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obybj-0005lB-MX for emacs-devel@gnu.org; Sat, 24 Sep 2022 02:25:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33306) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1obybi-0006Bk-Qj; Sat, 24 Sep 2022 02:25:46 -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=EtE/CovEQEHt2J6nJCrnk6rl6UBj/FMXZebmHOxuXSI=; b=mUnwtutY06Nc /L3oBV6B9xnwHCTZk4Eo4n8un8Ux8uMu8b4S578/MepsUo7yyJmvrRUr8kzGc/Y7NkMsTu4nknAO7 Dw9KBpPSdOsfe1HalKS8FUic0dlk2jqPUe/ZBJPMDpK4cKEPlX8vbgTeayXrEJ8hVaSMd3L6uoXiv HQmCIBndFUKGd2PbFOu4VAtZvgKHxPrGLGRpsnlH27fOYPTiOLBxVAIikApYjXtWCVKHPwf14Byma QxnB7ulZVIRU/BqMU/i57SMNSDn6CBNO74eQ94sIDCzKppqWLizI5np7hSLxNL6iw18Eij7NqPJCf 8jw6YHVWZ/l7jEmGpd+OFQ==; Original-Received: from [87.69.77.57] (port=3267 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 1obybg-0008JR-Si; Sat, 24 Sep 2022 02:25:46 -0400 In-Reply-To: <875yhdu4w7.fsf@mail.jao.io> (message from Jose A Ortega Ruiz on Fri, 23 Sep 2022 23:01:28 +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:296113 Archived-At: > From: Jose A Ortega Ruiz > 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 > >> 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.