GNU bug report logs - #47895
28.0.50; Emacs should only animate images that are visible

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Mon, 19 Apr 2021 18:20:02 UTC

Severity: normal

Tags: fixed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #38 received at 47895 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 47895 <at> debbugs.gnu.org
Subject: Re: bug#47895: 28.0.50; Emacs should only animate images that are
 visible
Date: Mon, 03 May 2021 11:52:52 +0200
Eli Zaretskii <eliz <at> 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




This bug report was last modified 4 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.