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#68006: 30.0.50; Image-mode speed Date: Sun, 03 Nov 2024 16:10:45 +0100 Message-ID: <87msigz72i.fsf@ledu-giraud.fr> References: <87le9jlfd6.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> <86ikt5zydo.fsf@gnu.org> Reply-To: Manuel Giraud Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11497"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: stefankangas@gmail.com, 68006@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 03 16:11:15 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 1t7cG2-0002oJ-RJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Nov 2024 16:11:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7cFv-0006NB-QI; Sun, 03 Nov 2024 10:11: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 1t7cFq-0006DJ-Rt for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 10:11:03 -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 1t7cFq-0000F9-G0 for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 10:11:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=2xZ5JvqLk+iP7bfT92X2uQ6P2xxAqCLj3LVBHqj4iD4=; b=HeiRJpC5RqwSGzE+s8eOm3pemHpimgZu2zH1Z7UYDvueSNL8Xfdc63s1+y6/h58ILaO7l8RK17DdCNTfvUUctE/rilteNmvn3lLrbdGM81y/mF+bROfVO+RYeF4UtSodag+5MPfAEQk3RLpfFnn0JIWWoQtzptw6hscb2mNtpkiRwSjWngGFQPRObatHj6gS011MhvskDvB/EYI3qlNQMLvIoV6JAJWA7wheI3tjqPsschshxV9QOy2PQi8vLTQHapdmiEa53QTrGORU71jXfytoZ9Z2430/ImYZm4OELzAXldkQOmgzBWxo/Jwb18ovxRU0B/O8GJTUCWdMBCS0VQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t7cFq-00025I-2v for bug-gnu-emacs@gnu.org; Sun, 03 Nov 2024 10:11: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: Sun, 03 Nov 2024 15:11: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.17306466558004 (code B ref 68006); Sun, 03 Nov 2024 15:11:02 +0000 Original-Received: (at 68006) by debbugs.gnu.org; 3 Nov 2024 15:10:55 +0000 Original-Received: from localhost ([127.0.0.1]:60969 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7cFi-000252-Ug for submit@debbugs.gnu.org; Sun, 03 Nov 2024 10:10:55 -0500 Original-Received: from ledu-giraud.fr ([51.159.28.247]:30430) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t7cFe-00024w-UW for 68006@debbugs.gnu.org; Sun, 03 Nov 2024 10:10:53 -0500 DKIM-Signature: v=1; a=ed25519-sha256; c=simple/simple; s=ed25519; bh=Bmlod+kS UF4gLcQPiamztOyiZfVb8fCM88WJFH4aABk=; h=date:references:in-reply-to: subject:cc:to:from; d=ledu-giraud.fr; b=gzn4gl2JoWE7ykfX55Fo98z80aZXBk i0XHgNfDGKDRdgFwXWRd+RfNqB9CcDAY05MeKE0PUJZ4zd0tqkOriADw== DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=rsa; bh=Bmlod+kSUF4gLcQP iamztOyiZfVb8fCM88WJFH4aABk=; h=date:references:in-reply-to:subject: cc:to:from; d=ledu-giraud.fr; b=vgIlgyrb5mplXyHeHFhVqHx6GRBpQsM8Q3u6bT cRKF2lUqOgHZzpMGK/8ytpFVs+WNm0nzBVgCMFU0L6kZusQnsRsqKW7AiLNfYzeWhfbCyd JW/DONqsN2DY52nsRDPlqVgoU2gjyyZFbxU04FWXP+mhDVtYkPyS6LX2hpRzDRtsDBPkch ukaNDITuN/oozTfDwy3f90dTnOmiwh13y+1fJdahY2L0Sxxd5HUEfXSFXx5rRN0Oz98wbp b9EWWSbA1fgSVtfBaMg3PZe4OqbOB8VUdiFMzhUr5zAy3U2vHFz2rf4bca5sndpyj62aK8 5GLexNflNKivLR0l7PSiNG4w== Original-Received: from computer ( [10.1.1.1]) by ledu-giraud.fr (OpenSMTPD) with ESMTPSA id 81bd78fb (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sun, 3 Nov 2024 16:10:47 +0100 (CET) In-Reply-To: <86ikt5zydo.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Nov 2024 13:08:35 +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:294798 Archived-At: Eli Zaretskii writes: >> From: Manuel Giraud >> Cc: stefankangas@gmail.com, 68006@debbugs.gnu.org >> Date: Mon, 28 Oct 2024 15:31:22 +0100 >>=20 >> 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. >>=20 >> 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. >>=20 >> 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, =E2=89=886MB for each file). I opened the first image in a 1640= x1000 >> window (so each image is scaled) and did the following: >>=20 >> - 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))) >>=20 >> Here is the timings I get: >>=20 >> - 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. Yes I thought that image-mode was a good candidate because I'm typically using it on directory with lots of images that I'd like to browse (with 'n' and 'p'). But I imagine that this is not a use case for everybody. In the same idea, I thought that DocView may also be a good candidate. What I imagined (on the Lisp side) is that a program could load a subset of images that are close to (in the sense of `image-next-file') the current one with a TTL set. > 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. Yes, sure there is a need for such Lisp API. I'll try to come up with something. --=20 Manuel Giraud