From: Lars Ingebrigtsen <larsi@gnus.org>
To: Evgeny Zajcev <lg.zevlg@gmail.com>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: Lazy image converters
Date: Sun, 16 Feb 2020 14:06:59 +0100 [thread overview]
Message-ID: <87lfp2wuj0.fsf@gnus.org> (raw)
In-Reply-To: <CAO=W_ZoDtv8oULLy-TrCDzB7zA8czK8NM8cZL=KrQ6K7+hr8pQ@mail.gmail.com> (Evgeny Zajcev's message of "Wed, 12 Feb 2020 17:11:02 +0300")
Evgeny Zajcev <lg.zevlg@gmail.com> writes:
> What if we have a lazy image, so its FILE-OR-DATA is calculated at
> redisplay time. 'image-convert' could utilize this. One of the
> approaches to lazy images is to allow FILE-OR-DATA to be a function
> returning actual file or data. Redisplay could call this func and
> substitute the value of FILE-OR-DATA in image spec with the results,
> kind of caching the results.
Hm... It does sound nice, but I worry about calling this complicated
(and slow) code from redisplay.
And in my experience, most of the time when you put images in a buffer,
you're going to display them, so it's not clear that this would often be
a win, UX wise.
I can see it being so when preparing huge directory-like buffers (with
images; I do that for my music playing interface) -- then the user will
normally only display a small subsection of the images, and then
delaying the processing of the images is a win.
And the same is the case for web pages, I guess, but there the download
time dwarfs anything Emacs does, so it wouldn't make much difference
there, I think?
So... I'm not convinced of the utility here, especially compared to the
potential problems arising from running complicated Lisp code from
redisplay.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2020-02-16 13:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-12 14:11 Lazy image converters Evgeny Zajcev
2020-02-16 13:06 ` Lars Ingebrigtsen [this message]
2020-02-16 17:45 ` Evgeny Zajcev
2020-02-19 13:44 ` Lars Ingebrigtsen
2020-02-16 15:20 ` Stefan Monnier
2020-02-17 11:02 ` Evgeny Zajcev
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfp2wuj0.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=lg.zevlg@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.