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.bugs Subject: bug#56546: 29.0.50; unbounded RAM comsumption when displaying images Date: Thu, 14 Jul 2022 12:15:50 +0300 Message-ID: <83leswt5q1.fsf@gnu.org> References: <87cze84gst.fsf@mail.jao.io> <8335f4uu17.fsf@gnu.org> <83zghctekc.fsf@gnu.org> <87r12onkhz.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9499"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mail@jao.io, 56546@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 14 11:23:28 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1oBv4C-0002FV-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 11:23:28 +0200 Original-Received: from localhost ([::1]:52796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBv4B-0003db-5j for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 14 Jul 2022 05:23:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBuxz-0002Wn-Kw for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:17:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBuxy-0008Cg-PG for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:17:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oBuxy-0001qj-FM for bug-gnu-emacs@gnu.org; Thu, 14 Jul 2022 05:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 14 Jul 2022 09:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56546 X-GNU-PR-Package: emacs Original-Received: via spool by 56546-submit@debbugs.gnu.org id=B56546.16577901757035 (code B ref 56546); Thu, 14 Jul 2022 09:17:02 +0000 Original-Received: (at 56546) by debbugs.gnu.org; 14 Jul 2022 09:16:15 +0000 Original-Received: from localhost ([127.0.0.1]:48750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBuxD-0001pO-H5 for submit@debbugs.gnu.org; Thu, 14 Jul 2022 05:16:15 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oBux9-0001p8-EE for 56546@debbugs.gnu.org; Thu, 14 Jul 2022 05:16:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBux3-00085j-N4; Thu, 14 Jul 2022 05:16:05 -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=ExP9U4j+rQMVEwgj1Qq2O5XVpiCtxtuJxtKPgIvnVv4=; b=LRkrnL46zCVo lXx7Uc3tI2Ch3mcDWUHHB+E8sFccMg1TwpvLqs6154Ibxbp65VXqMVC94o2T+wlRcqh6IpS6tEqOA ikWAEtJs34DpwxH9SKfHhev3oOg6pEGXU5UV24AQuWORkK/kJeg5FvATJt68faTyn+8dDQKrJYdKh eN04HhIc1qk6qPFC7DDrQER8B7OHJiFyKXoy2s4A8ypiF0E8lgKgCn1xkB6PgS11VjlHKNaajE/c/ DPjLVDEGsAmYze0NMH+s5DdU9MH6g2u8YrgVS0P26SUOC9C1UINgkZIzbBAkakMyVUjfTpRFNdCJD PTr/zxhQSj+aLFgAyR3Vxg==; Original-Received: from [87.69.77.57] (port=2057 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 1oBuwu-0005Rw-Lg; Thu, 14 Jul 2022 05:16:03 -0400 In-Reply-To: <87r12onkhz.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 14 Jul 2022 10:53:12 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236971 Archived-At: > From: Lars Ingebrigtsen > Cc: mail@jao.io, 56546@debbugs.gnu.org > Date: Thu, 14 Jul 2022 10:53:12 +0200 > > Eli Zaretskii writes: > > > Btw, did you try > > > > M-: (clear-image-cache) RET > > The problem is the animation cache, not the image cache, I think. And I > see that I forgot to make clear-image-cache clear the animation cache, > which it should. When we remove an image from the cache, its animations should also be removed, I agree. > And also -- the animation cache should be pruned regularly, but it's not > only pruned when doing animated images. I think it should also be > pruned from... gc? Or is there a different place it'd make sense to > prune that cache from? GC could be problematic. Imagine someone who has a frame displayed at all times animating something -- you don't want to clear those caches, right? I think we should perhaps track which images are actually displayed, and when was the last time they were displayed, and evict them from the cache after enough time has passed since the image was last displayed. > Finally, image-cache-size should also report the animation cache size, I > think. That'd help, yes.