From: Lars Ingebrigtsen <larsi@gnus.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 47895@debbugs.gnu.org
Subject: bug#47895: 28.0.50; Emacs should only animate images that are visible
Date: Mon, 03 May 2021 11:52:52 +0200 [thread overview]
Message-ID: <87bl9scfez.fsf@gnus.org> (raw)
In-Reply-To: <83zgxd7a1r.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 May 2021 12:35:28 +0300")
Eli Zaretskii <eliz@gnu.org> writes:
> Because image-animate-timeout calls image-metadata (via
> image-multi-frame-p), which calls lookup_image, which regenerates the
> pixmap.
Aah! Thanks; image.el doesn't have to keep calling that function -- it
can just call it once and then stash the data in the image plist.
I've now done that change on the trunk, and my test case went from using
100% CPU to using 7% CPU, which is an improvement. :-)
Virtually all of the remaining CPU usage comes from the call to
`force-window-update' -- and I guess that shouldn't be called if the
buffer isn't displayed in a window. Let's see...
Yup, with that change, the CPU usage went down to 2%.
So I think that this problem is now fixed, and I'm closing this bug report.
> But no repetitions were actually displayed yet, so won't this be
> confusing? Shouldn't we start counting only when the image is
> actually visible?
I don't really have an opinion here -- but the image animation code
hasn't taken this into consideration before, so that would be a change
in behaviour.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
prev parent reply other threads:[~2021-05-03 9:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-19 18:19 bug#47895: 28.0.50; Emacs should only animate images that are visible Lars Ingebrigtsen
2021-04-19 18:28 ` Eli Zaretskii
2021-04-19 20:49 ` Lars Ingebrigtsen
2021-04-20 2:24 ` Eli Zaretskii
2021-04-20 13:51 ` Eli Zaretskii
2021-04-25 18:48 ` Lars Ingebrigtsen
2021-04-25 19:01 ` Eli Zaretskii
2021-04-25 19:07 ` Lars Ingebrigtsen
[not found] ` <YIciJ+1fSjJGcu+P@faroe.holly.idiocy.org>
2021-04-27 15:51 ` Alan Third
2021-04-27 23:23 ` Lars Ingebrigtsen
2021-05-02 9:35 ` Eli Zaretskii
2021-05-03 9:52 ` Lars Ingebrigtsen [this message]
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=87bl9scfez.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=47895@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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).