GNU bug report logs - #23431
Displaying animated GIFs can make Emacs unresponsive

Previous Next

Package: emacs;

Reported by: Juliusz Chroboczek <jch <at> pps.univ-paris-diderot.fr>

Date: Tue, 3 May 2016 03:31:01 UTC

Severity: normal

Found in version 25.0.93

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 23431 <at> debbugs.gnu.org, jch <at> pps.univ-paris-diderot.fr
Subject: Re: bug#23431: 25.0.93; EWW hangs
Date: Tue, 03 May 2016 18:26:52 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Lars Ingebrigtsen <larsi <at> gnus.org>
>> Date: Tue, 03 May 2016 17:57:59 +0200
>> Cc: 23431 <at> debbugs.gnu.org
>> 
>> First of all: Can the animation function determine that it's making
>> Emacs unresponsive?  I guess it could keep track of how much time is
>> passing between each time it's called, and if that's longer than the
>> timeout, it should ... postpone itself a bit further to allow some
>> keystrokes to get in between each frame?
>
> Can you show how that function is called on the Lisp level?

It's the `image-animate-timeout' function in image.el.

(defun image-animate-timeout (image n count time-elapsed limit)

[...]

	   (delay (max (+ (* (or (cdr animation) image-default-frame-delay)
			     (/ 1.0 (abs speed)))
			  time (- (float-time)))
		       image-minimum-frame-delay))

[...]

      (unless done
	(run-with-timer delay nil 'image-animate-timeout
			image n count time-elapsed limit)))))

So I think it shouldn't be too difficult to ... do something useful
here...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 9 years and 69 days ago.

Previous Next


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