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#68006: 30.0.50; Image-mode speed Date: Tue, 26 Dec 2023 19:15:46 +0200 Message-ID: <8334voanr1.fsf@gnu.org> References: <87le9jlfd6.fsf@ledu-giraud.fr> <83wmt3bkla.fsf@gnu.org> <87h6k6lgdy.fsf@ledu-giraud.fr> <83wmt29zfy.fsf@gnu.org> <87il4m6rcx.fsf@ledu-giraud.fr> <83bkae9j11.fsf@gnu.org> <87bkadyqdk.fsf@ledu-giraud.fr> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20713"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68006@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 26 18:17:32 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 1rIB3b-0005Ah-TB for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Dec 2023 18:17:32 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rIB3H-0000Dn-CC; Tue, 26 Dec 2023 12:17:11 -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 1rIB3C-0000DX-AZ for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 12:17:08 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rIB3A-0002an-2C for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 12:17:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rIB37-0000bh-Ri for bug-gnu-emacs@gnu.org; Tue, 26 Dec 2023 12:17: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: Tue, 26 Dec 2023 17:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68006 X-GNU-PR-Package: emacs Original-Received: via spool by 68006-submit@debbugs.gnu.org id=B68006.17036109731858 (code B ref 68006); Tue, 26 Dec 2023 17:17:01 +0000 Original-Received: (at 68006) by debbugs.gnu.org; 26 Dec 2023 17:16:13 +0000 Original-Received: from localhost ([127.0.0.1]:34872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIB2K-0000TX-Pk for submit@debbugs.gnu.org; Tue, 26 Dec 2023 12:16:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58920) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rIB2I-0000LG-Ga for 68006@debbugs.gnu.org; Tue, 26 Dec 2023 12:16:11 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rIB2E-0002Qs-A4; Tue, 26 Dec 2023 12:16:06 -0500 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=gdqUIvnxpOV7/81jd+QIOI+1XyqBoMXNb/b/ZgwOQ5c=; b=bdARTC8t5nwB aiqXDxDHEPy3kP0xXvrAO7X+1ZN4bXZCPWMUZdGAWRRcMQMTCcKM62QEIyvxyXUJesBOX7jkoQ8Vz kMatFY6pQmnl+mkCtRJZx6TTqfkn18GgJOXQhJT7YVqzGmjocLpmCYgMstJ59dbySc3frKzT7gqPt UD4e4CZqJQLqnCKGkqlGew/HjeanSUeQ8D64MdO0qNYZ5l+kmDw8Rm0ezAa9pwJ0RtBXuhFszS6QF s83LHdZzGHL6+MxD2wPMyTaOHbhaIcM/YK9qha7wkmB5N/20t7amAYLbRz8liiCIW1jR4n9lPflof 5FsCp50osRnoOTc9N37nKA==; In-Reply-To: <87bkadyqdk.fsf@ledu-giraud.fr> (message from Manuel Giraud on Tue, 26 Dec 2023 15:45:11 +0100) 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:276913 Archived-At: > From: Manuel Giraud > Cc: 68006@debbugs.gnu.org > Date: Tue, 26 Dec 2023 15:45:11 +0100 > > >> About being sure to display the file on disk, maybe we could call > >> 'image-flush' only if the file has changed since its display. WDYT? > > > > Provided that the check is reliable, I guess so. > > > > In any case, I think we should be cautious and leave a knob to get > > back the old behavior, in case there are some situations we don't > > anticipate that need to flush the caches. > > Hi, > > What do you think of this? Of course, it will need a NEWS entry but I > wanted to polish it first. I have made it opt-in. I have used it a bit > the cache could grow fast but I find it quite pleasant to use (for > Docview also). Using img->timestamp is not reliable enough, since that timestamp is updated each time we call prepare_image_for_display, which can happen many times during a session for the same image, and not necessarily for actually displaying the image in a window. For example, AFAICT if you move across an image with C-n/C-p, we update the time stamp each time vertical motion crosses the screen line with the image. So I think we'd need to store the file's time stamp or some other signature. The comparison with times-less-p is also risky: what if someone replaces the image file with an older file? I'd trust some kind of file checksum better, which we will have to store alongside the image spec or as part of it. (Don't we already do something like that somewhere in image-*.el files?)