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: Sat, 02 Nov 2024 13:08:35 +0200 Message-ID: <86ikt5zydo.fsf@gnu.org> References: <87le9jlfd6.fsf@ledu-giraud.fr> <83r0izzn1p.fsf@gnu.org> <87le95rqoh.fsf@ledu-giraud.fr> <83plyhvvso.fsf@gnu.org> <87h6jtrlci.fsf@ledu-giraud.fr> <83jzopvsgj.fsf@gnu.org> <87bka0hpto.fsf@ledu-giraud.fr> <83il48x4a8.fsf@gnu.org> <875y08gikv.fsf@ledu-giraud.fr> <831qawvx7q.fsf@gnu.org> <871qavhpxf.fsf@ledu-giraud.fr> <83edevvqyj.fsf@gnu.org> <87v887g85d.fsf@ledu-giraud.fr> <83a5pjvo3s.fsf@gnu.org> <87a5pid2zq.fsf@ledu-giraud.fr> <87o73jf46r.fsf@ledu-giraud.fr> <86h698l9mb.fsf@gnu.org> <875xplvk77.fsf@ledu-giraud.fr> <86jze1hhj1.fsf@gnu.org> <877ca1sfcd.fsf@ledu-giraud.fr> <867ca1h69p.fsf@gnu.org> <87zfmomh8l.fsf@ledu-giraud.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29209"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stefankangas@gmail.com, 68006@debbugs.gnu.org To: Manuel Giraud Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Nov 02 12:09:27 2024 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 1t7C0V-0007SW-19 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 02 Nov 2024 12:09:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7C0B-0004l7-Ro; Sat, 02 Nov 2024 07:09:09 -0400 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 1t7C06-0004ko-JL for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 07:09:02 -0400 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 1t7C06-0003an-At for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 07:09:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=0KmOgrxULRAtYz6K4+FuCsmlPRZ2ev9Wa6Vy5+s2Rgk=; b=ltDDhRdW7AJ52+9Jmu5vjAOlJypiYhj0YESg/ylzfBfsGoaYzXDjRLx/RZf2S3TC6jRaBmavkJX9w76FTGRhgzrSTedMljDqUbXV2L/x/Md48kfDRcpc1PsDblH/MjA+9BZ58qcu+3Ni3MO4cqvjHEIyJjO29B261vHu1Ddla6TigiKl2NkZNeqwccUTP437mmuHndaeI1djYxYSWYzlkgy5AxhJ1lcHcKnRDIQ+msqfWOpLY+zqMQ/Ix8o0LT0B45ZFbJgZeo27viQuSkEdcE6UWsCHlD15o8jnEN9Ot76H8i+ANjwgj3fhYJveOdttTtkEez90BRc6TvgNY1VVRg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7C06-000798-52 for bug-gnu-emacs@gnu.org; Sat, 02 Nov 2024 07:09: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: Sat, 02 Nov 2024 11:09:02 +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.173054573027459 (code B ref 68006); Sat, 02 Nov 2024 11:09:02 +0000 Original-Received: (at 68006) by debbugs.gnu.org; 2 Nov 2024 11:08:50 +0000 Original-Received: from localhost ([127.0.0.1]:53275 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7Bzu-00078p-Dd for submit@debbugs.gnu.org; Sat, 02 Nov 2024 07:08:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:44502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7Bzs-00078h-DQ for 68006@debbugs.gnu.org; Sat, 02 Nov 2024 07:08:49 -0400 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 1t7Bzm-0003Z7-PE; Sat, 02 Nov 2024 07:08:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=0KmOgrxULRAtYz6K4+FuCsmlPRZ2ev9Wa6Vy5+s2Rgk=; b=E/xfumBCZfdDQkK5xNN/ dpjdqTh9SZMPP0VwgxCU+cYyeZ8LqtniI20FnQhKecbRdo8m42E5racnbI5vbBqdQic3mVFqxJwyc HVP7QO5qIhtDyhpvFGrTfhRXIB5WFfQB3etqIuD7wBrXk8kotKsyfmQhtWzAKvOVwDEsK6+nu5Wrr PDVNliY7Q2lze5gsi9Ub2tbkqQIn81P/pP9c3MJA84t9DNVFXhUsmjEujgcjIem71j1/8FIDRWIE+ 0P5MBgAuYb0S3/Lz46azWJA0T6LZdpYkP4Iut+hpDTd0Lk57Bcy1pYHJah+tJbxVEaZK0+MEJDVyr OLt2qL/fY7WN0Q==; In-Reply-To: <87zfmomh8l.fsf@ledu-giraud.fr> (message from Manuel Giraud on Mon, 28 Oct 2024 15:31:22 +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:294727 Archived-At: > From: Manuel Giraud > Cc: stefankangas@gmail.com, 68006@debbugs.gnu.org > Date: Mon, 28 Oct 2024 15:31:22 +0100 > > Here is a new version for my patch to add some user control on the image > cache. This time, I have done some tests and benchmarks. > > Instead of trying to have a completely different cache, I'm using the > current one but I had a condition to flush (or not) an image based on a > user defined time to live (TTL) for an image. This TTL is a number of > seconds since the image was last displayed. > > I have also tested it in image-mode with the second patch. I tested by > browsing a directory with some rather large pictures in it (4000x3000 > pixels, ≈6MB for each file). I opened the first image in a 1640x1000 > window (so each image is scaled) and did the following: > > - M-: (dotimes (i 10) (image-next-file 1)) ;; for cache warming > - M-: (dotimes (i 10) (image-next-file -1)) ;; return to first image > - M-: (benchmark-run 10 (dotimes (i 10) (image-next-file 1)) > (dotimes (i 10) (image-next-file -1))) > > Here is the timings I get: > > - with master (ea685170063): (109.208767158 15 1.0938777159999997) > - with this patch: (6.934307561 15 1.095243891) The C part looks OK, but I don't understand how will this be used by Lisp programs. We don't intend to use the new TTL member by default each time we display an image, do we? So I think we need to analyze the various uses of images and decide which ones will use TTL (and what values to use in that case) and which won't. I also envision a need to have a Lisp API which takes an existing image and sets its TTL to a given value. And maybe other APIs as well, I don't know. But without such APIs and without sensible defaults about them, this features sounds incomplete.