From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#47895: 28.0.50; Emacs should only animate images that are visible Date: Mon, 03 May 2021 11:52:52 +0200 Message-ID: <87bl9scfez.fsf@gnus.org> References: <87r1j6m920.fsf@gnus.org> <8335vmrux2.fsf@gnu.org> <87mttum230.fsf@gnus.org> <83r1j5qd2x.fsf@gnu.org> <87v98ajj3k.fsf@gnus.org> <834kfukx2v.fsf@gnu.org> <87bla2ji7v.fsf@gnus.org> <83zgxd7a1r.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32117"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 47895@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 03 11:54:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldVHG-0008GD-BZ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 11:54:10 +0200 Original-Received: from localhost ([::1]:53312 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldVHF-0001tz-Em for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 03 May 2021 05:54:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldVH8-0001tm-Fy for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 05:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34703) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldVH8-0004RR-9E for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 05:54:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldVH8-00044e-87 for bug-gnu-emacs@gnu.org; Mon, 03 May 2021 05:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 May 2021 09:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47895 X-GNU-PR-Package: emacs Original-Received: via spool by 47895-submit@debbugs.gnu.org id=B47895.162003558515635 (code B ref 47895); Mon, 03 May 2021 09:54:02 +0000 Original-Received: (at 47895) by debbugs.gnu.org; 3 May 2021 09:53:05 +0000 Original-Received: from localhost ([127.0.0.1]:46246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldVGD-000447-Ky for submit@debbugs.gnu.org; Mon, 03 May 2021 05:53:05 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:40114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldVGA-00043f-8S for 47895@debbugs.gnu.org; Mon, 03 May 2021 05:53:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TdlP1thL6OuKoVcv+H6gPN4pCrxBkJ7jNxh3MNL0bL4=; b=WJYDfjptwqZhB1ISbVPgndSmNO V7G4+aj3GqKeFdhXHJ8bxA4DlTGH0Y8oXcpspnFQ2mCqUvJFw2NKfkKScUwST/NhGTekGdHW8g9gx zkC7/je1rqCeM2n7vN9Z4q0Cnm8YM3tQph5XzLZ/2ftIrR9F0P3xPdCtP5bX2yqZkXlc=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ldVG1-0003XU-34; Mon, 03 May 2021 11:52:55 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEWqVytOIgrOokbH p6j///8RjwGeAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UFAwkROsoMwSIAAAF7SURBVDjLfZOLrcMw CEWBLADuAsQTpMr+uz2+jlupz0qjxsdcvgb4Z7H9SLU+Ziz7JyL2AXOe4osREqB/0UR7AthJO93A jihLAVNGl/ITDmQtDikCDdFSElYskFEo5LYME32ATsAWQhgbINwdbFIekhvhN3AD0srpG5SbT+BZ aKVOYw/XNqG9u9ECp22YZ3RXLvck6IW0tNsKIItsFh6Uy4CXn8qCDYyJIIQZ4UigXv1omZfaAQfQ zMCz5+t4ywIny33c/lx8vzaAjMdx3a/jevP16kbSavy+2MdFhXmNEuXYWBBWZo7JOkAJLoCrtLKP 8NjADsKbb3HPXQB7JUmAD8DurAM8Gyh7tRnkGyAE6P5FdUeCjmQb0vBhQ7mnzt7BAKgfwIZvlgXv xfIoCkzzWJWrAwm068BElXb42ArEHV5Y6AKmVJIPyHGGrKDPxw6QKGY4LkKDuEoMcYFGgaWETKeH NdtCNRohKuqzywWyQXbsHBiGo8GP9RP8AddDTNzcWU0jAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIx LTA1LTAzVDA5OjE3OjU4KzAwOjAw0z61KAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wNS0wM1Qw OToxNzo1OCswMDowMKJjDZQAAAAASUVORK5CYII= X-Now-Playing: Sector 27's _Sector 27 Complete_: "Total Recall" In-Reply-To: <83zgxd7a1r.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 02 May 2021 12:35:28 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:205493 Archived-At: Eli Zaretskii 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