unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: stefankangas@gmail.com, 68006@debbugs.gnu.org
Subject: bug#68006: 30.0.50; Image-mode speed
Date: Sun, 03 Nov 2024 16:10:45 +0100	[thread overview]
Message-ID: <87msigz72i.fsf@ledu-giraud.fr> (raw)
In-Reply-To: <86ikt5zydo.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Nov 2024 13:08:35 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Manuel Giraud <manuel@ledu-giraud.fr>
>> 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.

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.
-- 
Manuel Giraud





  reply	other threads:[~2024-11-03 15:10 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-24 16:44 bug#68006: 30.0.50; Image-mode speed Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-24 17:01 ` Eli Zaretskii
2023-12-25 10:34   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-25 13:36     ` Eli Zaretskii
2023-12-25 18:59       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-25 19:30         ` Eli Zaretskii
2023-12-26 14:45           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-26 17:15             ` Eli Zaretskii
2023-12-26 18:07               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-26 18:43                 ` Eli Zaretskii
2023-12-27 12:13                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-27 13:36                     ` Eli Zaretskii
2023-12-29 11:11                       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-29 12:13                         ` Eli Zaretskii
2023-12-30 11:36                           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-30 12:37                           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-30 23:57                             ` Stefan Kangas
2023-12-31  7:16                               ` Eli Zaretskii
2024-01-02  0:19                                 ` Stefan Kangas
2024-01-02 12:10                                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 12:49                                   ` Eli Zaretskii
2024-01-02 16:04                                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-02 17:02                                       ` Eli Zaretskii
2024-01-04 16:47                                         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-04 17:43                                           ` Eli Zaretskii
2024-01-04 18:42                                             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-04 18:55                                               ` Eli Zaretskii
2024-01-04 19:16                                                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-04 19:54                                                   ` Eli Zaretskii
2024-01-05 10:50                                                     ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 11:25                                                       ` Eli Zaretskii
2024-01-05 13:26                                                         ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 13:40                                                           ` Eli Zaretskii
2024-01-05 14:35                                                             ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-05 14:41                                                               ` Eli Zaretskii
2024-01-05 14:54                                                                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-01-06 13:07                                                                 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-17  9:51                                                                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-19  9:34                                                                     ` Eli Zaretskii
2024-10-21 10:12                                                                       ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 10:33                                                                         ` Eli Zaretskii
2024-10-21 14:25                                                                           ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-21 14:36                                                                             ` Eli Zaretskii
2024-10-22 16:28                                                                               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-28 14:31                                                                               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-11-02 11:08                                                                                 ` Eli Zaretskii
2024-11-03 15:10                                                                                   ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-01-01 10:10                               ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87msigz72i.fsf@ledu-giraud.fr \
    --to=bug-gnu-emacs@gnu.org \
    --cc=68006@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=manuel@ledu-giraud.fr \
    --cc=stefankangas@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).