From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#33275: 27.0.50; Image cache pruning Date: Mon, 05 Nov 2018 20:13:27 +0100 Message-ID: References: <83va5bcxxu.fsf@gnu.org> <83sh0fcx2r.fsf@gnu.org> <83o9b3cu4f.fsf@gnu.org> <83muqncry4.fsf@gnu.org> <83k1lrcqza.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1541445126 18737 195.159.176.226 (5 Nov 2018 19:12:06 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2018 19:12:06 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 33275@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 05 20:12:02 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 1gJkI5-0004hS-QB for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 20:12:01 +0100 Original-Received: from localhost ([::1]:37226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJkKC-0001xu-6l for geb-bug-gnu-emacs@m.gmane.org; Mon, 05 Nov 2018 14:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJkK5-0001n1-Hy for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:14:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJkK2-0005ma-C6 for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:14:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59596) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJkK2-0005mS-7r for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:14:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gJkK1-0000YK-S4 for bug-gnu-emacs@gnu.org; Mon, 05 Nov 2018 14:14:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Nov 2018 19:14: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.15414452182087 (code B ref 33275); Mon, 05 Nov 2018 19:14:01 +0000 Original-Received: (at 33275) by debbugs.gnu.org; 5 Nov 2018 19:13:38 +0000 Original-Received: from localhost ([127.0.0.1]:35621 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJkJe-0000Xb-7A for submit@debbugs.gnu.org; Mon, 05 Nov 2018 14:13:38 -0500 Original-Received: from ryder.getmail.no ([84.210.184.14]:42825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gJkJc-0000XN-Jp for 33275@debbugs.gnu.org; Mon, 05 Nov 2018 14:13:37 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by ryder.getmail.no (Postfix) with ESMTP id E2E9562C86; Mon, 5 Nov 2018 20:13:28 +0100 (CET) Original-Received: from ryder.getmail.no ([127.0.0.1]) by localhost (ryder.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id bhxOkkO24Vop; Mon, 5 Nov 2018 20:13:28 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ryder.getmail.no (Postfix) with ESMTP id 77E6262C87; Mon, 5 Nov 2018 20:13:28 +0100 (CET) X-Virus-Scanned: amavisd-new at ryder.getmail.no Original-Received: from ryder.getmail.no ([127.0.0.1]) by localhost (ryder.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id II4H5AMbQaO7; Mon, 5 Nov 2018 20:13:28 +0100 (CET) Original-Received: from stories (cm-84.212.221.165.getinternet.no [84.212.221.165]) by ryder.getmail.no (Postfix) with ESMTPSA id 3065862C86; Mon, 5 Nov 2018 20:13:28 +0100 (CET) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAIVBMVEX+/thGAw9eUVv+/93+ //fq3LH58cKsqZr+/dP9+s7+/99hXvwTAAACQklEQVQ4jW3TMY/aMBQHcEup2pQtLJ1tiYvUCSlt VWV2qyoTQnLCdUI6Ac1NlVVjcVOWqmGrSgtnpui4tJw/ZZ8dc+QQb0rej/d37ATE0ulJMVsobd+n x2vkLieSBEGXyIYmDtZqygNTXdJzv7OQKzXDFgJChAszoNS6GWjJBNmBDT5Al4TNCMqhr4ZBcByZ O1DtJDuilAHoqz/4BNYONi2ArEszYqD88RQW0DNQnoO1nTiJWiyhiWDgCLiBEgTdlo9RXUKwXXx5 gO/YPSjjBkbQUqhsQS9vg4/KJXbnlw1N3heAJUCBLEBHMolfkfC29C0gVLgJIjnu8QvoAxQIijfQ DTme86+lXcPW0PZlKGZkNLSwNG0P/bIPK8R1HQ6yn27C63voBYalRaIpFUWGfFjERHme95aEnA+S e0oZypEPZaK8OI64yOTnj78pzaFxiDIgxUxe1hVN2hBF8W4mplJkCw0AJ2H3AUk61n9ZmonxTfJp FSFY3E7EsYaC7zlPt3q/6ts+ACQZmLCMkHDwfAxH0WzQ8yzUjHfJXNfjl+MDRHEDmUy3u3rcP4EK /iu53r3L+4V/OCsbpQGuk11HuX08rgFZ+TZ56BTwGgoXdYB0FOW6qOx78M3EzsJGMjFd6Y6unlVm j8glVRIqvdKR3tGkDTMDbKv7+g2lVFelOSoownGIxfD1v4uHkJp6jyJzVnv4OOFEhuIu/MAtJE3U Psu45DK70d+otEBRBI9rLmrGxoN7+lgAcev2CZztU8SuzsN/F61wm8Zh404AAAAASUVORK5CYII= In-Reply-To: <83k1lrcqza.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 05 Nov 2018 20:35:21 +0200") 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:152077 Archived-At: Eli Zaretskii writes: > We still could use the memory limit calculated by get_lim_data in > strategic places, like cache_image, to catch situations where the > cache size exceeds some fraction of what ret_lim_data returns. Would > that work? If I understand you correctly, you seem to favour introducing code that will break code that's working today (if you insert an image into a buffer today in a memory-pressure situation, that won't signal an error today) instead of tweaking a non-documented ad-hoc caching strategy (by taking the image cache size into consideration), or fixing the caching (by using weak hash tables), and I'm not quite sure why. `image-size' didn't use to cache images, but was introduced as an optimisation. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no