From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#61763: 30.0.50; Image Cache Size growth Date: Fri, 24 Feb 2023 22:32:49 +0100 Message-ID: <874jralpfi.fsf@ledu-giraud.fr> References: <87y1on9ey7.fsf@ledu-giraud.fr> <83o7pjm1h0.fsf@gnu.org> <87cz5ylukl.fsf@ledu-giraud.fr> <83cz5yn8iz.fsf@gnu.org> <878rgmlsg2.fsf@ledu-giraud.fr> <837cw6n6ap.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29560"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 61763@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 24 22:33:34 2023 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 1pVfh8-0007UY-2L for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Feb 2023 22:33:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVfgi-0000tG-Oe; Fri, 24 Feb 2023 16:33:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVfgd-0000sz-Bd for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 16:33:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pVfgc-0006q1-7j for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 16:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pVfgc-0002fH-37 for bug-gnu-emacs@gnu.org; Fri, 24 Feb 2023 16:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Manuel Giraud Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Feb 2023 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61763 X-GNU-PR-Package: emacs Original-Received: via spool by 61763-submit@debbugs.gnu.org id=B61763.167727437610225 (code B ref 61763); Fri, 24 Feb 2023 21:33:02 +0000 Original-Received: (at 61763) by debbugs.gnu.org; 24 Feb 2023 21:32:56 +0000 Original-Received: from localhost ([127.0.0.1]:38392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVfgV-0002er-MK for submit@debbugs.gnu.org; Fri, 24 Feb 2023 16:32:55 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:31274) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pVfgT-0002eg-Es for 61763@debbugs.gnu.org; Fri, 24 Feb 2023 16:32:54 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=PhJ9x1sc jaDxP2V0Bf7dxP5KfGsNGJOi6mCDE90FHpA=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=biwfbAlZ56w2JjoDblOhsIBglnyTh9 XADqdU68XsSwBOk3srvGX7U84J03a8wAUSMhHiiPoY+78bq9/Yo0DSCw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=PhJ9x1scjaDxP2V0 Bf7dxP5KfGsNGJOi6mCDE90FHpA=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=eA1Bg5Q4GQFlidDtIevZqxQ0xC+1hQ+S9pA4JO FRO7pBVCV4WcRX8ws4lE69CLrDxiNufXj1EBss9R5YBAxuHFVX0vqm5C2QOQkSn+4Z+He5 cmHrD4vvioZPz2CmdGXb30pPf2ztzPSuCW3BXN8ZC3b6OzfHAPURnadKZZcFOKM3k6qGWC zliJNR96NSdw4loG7W80bmTgUb1HCGn1ddKN88qozSLPw74f8XFWHcPzd2vXKe61Zhv9im yQLuySRXHKT1hT29eFHsq6YgTZxWKkFYffMGqYtEBWEg6GLJo+ji5EhfV6eP0QaI9vt8nF cFzg6ReA6eI0BBp+CcSv+5oQ== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id f91552bd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 24 Feb 2023 22:32:51 +0100 (CET) In-Reply-To: <837cw6n6ap.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 24 Feb 2023 22:43:10 +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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:256663 Archived-At: Eli Zaretskii writes: [...] > JPEG compression is very good, it routinely compresses images with > ratios of 10:1 to 20:1. If I use djpeg to convert the 2 MiB images I > used into BMP, I get 36 MiB BMP files -- that's a 1:18 expansion > ratio. And Emacs converts each image to a pixmap for display, which > is basically similar to what I did. Multiply that by 20 or 30, and > you get the numbers you see, I think. Yes, one of the images I'm using is 3264 by 2448 pixels times 3 octets (RGB, I guess) and we get about 23MiB... so those numbers seems ok. > The solution is to enlarge the VM for your machine (by enlarging swap, > for example). If you don't keep those images displayed in windows, > lowering image-cache-eviction-delay might also help. In image.c line 2079, there is already a mecanism to automatically lower this delay if the cache has grown large (so I think we're covered here). But OTOH, at line 3010, we can see that this cache will grow no matter what. Maybe we should have parameter (maybe a custom) that limit this growth up to a certain point and then start uncaching older images. WDYT? -- Manuel Giraud