From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#33275: 27.0.50; Image cache pruning Date: Mon, 05 Nov 2018 20:14:27 +0200 Message-ID: <83muqncry4.fsf@gnu.org> References: <83va5bcxxu.fsf@gnu.org> <83sh0fcx2r.fsf@gnu.org> <83o9b3cu4f.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1541442030 9281 195.159.176.226 (5 Nov 2018 18:20:30 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2018 18:20:30 +0000 (UTC) Cc: 33275@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 19:20:26 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJjU9-0002Id-L9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 19:20:25 +0100 Original-Received: from localhost ([::1]:36911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjWF-0008H0-R7 for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 13:22:35 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjP0-0006PI-3l for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 13:15:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJjOv-0001Fh-W0 for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 13:15:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59547) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJjOv-0001FV-RX for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 13:15:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJjOv-0007Qs-M6 for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 13:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Nov 2018 18:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33275 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33275-submit@debbugs.gnu.org id=B33275.154144169728547 (code B ref 33275); Mon, 05 Nov 2018 18:15:01 +0000 Original-Received: (at 33275) by debbugs.gnu.org; 5 Nov 2018 18:14:57 +0000 Original-Received: from localhost ([127.0.0.1]:35572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJjOm-0007QI-Li for submit@debbugs.gnu.org; Mon, 05 Nov 2018 13:14:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJjOh-0007Q1-AN for 33275@debbugs.gnu.org; Mon, 05 Nov 2018 13:14:50 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJjOX-0000nS-OO for 33275@debbugs.gnu.org; Mon, 05 Nov 2018 13:14:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:60674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJjOX-0000n8-J6; Mon, 05 Nov 2018 13:14:37 -0500 Original-Received: from [176.228.60.248] (port=1767 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1gJjOW-0007DH-Ki; Mon, 05 Nov 2018 13:14:37 -0500 In-reply-to: (message from Lars Ingebrigtsen on Mon, 05 Nov 2018 18:48:33 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:152070 Archived-At: > From: Lars Ingebrigtsen > Cc: 33275@debbugs.gnu.org > Date: Mon, 05 Nov 2018 18:48:33 +0100 > > Anyway, there's code that tries to keep the cache small: > > /* If the number of cached images has grown unusually large, > decrease the cache eviction delay (Bug#6230). */ > delay = XFIXNUM (Vimage_cache_eviction_delay); > if (nimages > 40) > delay = 1600 * delay / nimages / nimages; > > But it works solely on the number of images in the cache, and not the > size of the images. So it's a heuristic that could be tweaked pretty > easily, I think? I don't see why we should tweak our cache management for the benefit of exceptional use case. Last time we did it (with fonts) we are still leaking the wounds. I think it should be enough to catch excess memory usage and signal an error. I hope this is possible.