From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Evgeny Zajcev Newsgroups: gmane.emacs.devel Subject: Re: excessively slow image animation Date: Thu, 14 Feb 2019 02:29:45 +0300 Message-ID: References: <20190213231459.GA26737@breton.holly.idiocy.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="0000000000007ad91d0581ceebd3" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="119977"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Lars Ingebrigtsen , emacs-devel@gnu.org To: Alan Third Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 14 00:45:38 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gu4Di-000V6T-Dz for ged-emacs-devel@m.gmane.org; Thu, 14 Feb 2019 00:45:38 +0100 Original-Received: from localhost ([127.0.0.1]:36809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu4Dh-0000jN-DS for ged-emacs-devel@m.gmane.org; Wed, 13 Feb 2019 18:45:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:47743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gu49F-0005by-LI for emacs-devel@gnu.org; Wed, 13 Feb 2019 18:41:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gu3yZ-0000xj-FQ for emacs-devel@gnu.org; Wed, 13 Feb 2019 18:30:00 -0500 Original-Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:34391) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gu3yZ-0000vz-7j for emacs-devel@gnu.org; Wed, 13 Feb 2019 18:29:59 -0500 Original-Received: by mail-lf1-x132.google.com with SMTP id u21so3156335lfu.1 for ; Wed, 13 Feb 2019 15:29:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bsM4R3GQOG8ujTdA6KKe9VqEGhDT03j+hTFUvqkuU4Q=; b=rG9UQsbQpmzfgfqz40PSfb6VQo/YOmWTPOC8m21qdg2ueq8qWUVYCDk0FGFT6vrHMf wkIYbjNfXgNph+SJA3ZWyTtKVuUK8HYL3dz4CZcdaFh+Z7d83yuRV/XNMJNVQbV5Ry44 JrLXnR8aET5iDfOdNKNIn0pRvj88IJxvGrGJvrS0FPdWsTci7tUaUfmnUW9Q0R4xkJRx La5BXk3dUo4okmDBzIdKgdYzCJr9sUQ5lDEXvdZgJ5IXZmH7rOI9KtiqsRfsoLL+0F88 xyHpx0jwSBBYfKuACsZ7U3uWZ2xB+S2+zJ6cXgLUeLeV+4c38kPkXLZtPFery0NH/L+z fv3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bsM4R3GQOG8ujTdA6KKe9VqEGhDT03j+hTFUvqkuU4Q=; b=d7p8yqvlHXAB/cQyCuEawsk7VHlcoXSm6knfbHnIwKqnbVmS4qf8NmUB4LHbmbrs+n EvxnM1qt4F18xay2EGdOJCB07kkfU5WIfIZIaGazb2hqHGqyq9NX5/sqsMTHLCiHZqGl FqsBUObt5oz1917tHbH+lWLCmRvExBsciptBcWccBH32+fFLGOA+/rR1G63/4C91mOFs riJarIP7VPLPSJxKJ08ihbGdanj5YOB+ILjBMG0Jc0022d1ga/WLX+VP9QbS6U0+0jpQ nNQAFal6ZIu+w9y+Cs7eUe6XjLwtHa8Dw7bMQk4S2CWRYZdfUbWzYsa/E/cj2cCTTsXO ay4Q== X-Gm-Message-State: AHQUAuaDVMJHslD9QZLqbNwpWCcedOX5ZCyUbuwLbIMuRtsBwv/a0XoB NxnB2/FOxxW1BidrNQPq07RgCXqcbpfGqVfDN4o= X-Google-Smtp-Source: AHgI3Ia9u2koQeWVc8WzvTztxA21+WbbOT6PD+3uN7C0AmZ3TqNbq8ZV+oDtn7JeMgR4zTCz6OdwtmrmJJAyAnaILXE= X-Received: by 2002:ac2:4297:: with SMTP id m23mr385607lfh.141.1550100597494; Wed, 13 Feb 2019 15:29:57 -0800 (PST) In-Reply-To: <20190213231459.GA26737@breton.holly.idiocy.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::132 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:233297 Archived-At: --0000000000007ad91d0581ceebd3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =D1=87=D1=82, 14 =D1=84=D0=B5=D0=B2=D1=80. 2019 =D0=B3. =D0=B2 02:15, Alan = Third : > On Wed, Feb 13, 2019 at 06:03:51PM +0100, Lars Ingebrigtsen wrote: > > Evgeny Zajcev writes: > > > > > I've got multi frame image at http://lgarc.narod.ru/giphy.mp4 > > > > > > And run next code on it: > > > > > > (let ((ctime (float-time))) > > > (setq img (create-image "~/tmp/giphy.mp4" 'imagemagick nil :scale > 1.0)) > > > (insert-image img) > > > (cl-dotimes (index 65) > > > (image-show-frame img index 'nocheck) > > > (sit-for 0.0)) > > > (- (float-time) ctime)) > > > =3D=3D> 18.788017988204956 > > > > > > 18 seconds to show every frame > > > > Wow, that's slow... > > As an aside: for some reason if you run this a second time it doesn=E2=80= =99t > use the already cached images from the first run, so it=E2=80=99s just as= slow > as that first run. I may be misunderstanding how the cache is supposed > to work, but that doesn=E2=80=99t seem right to me. > Cache washes out really fast even if you set `image-cache-eviction-delay' to huge value. In my case, I want to animate 50 images simultaneously and it is not yet possible without tweeks. --=20 lg --0000000000007ad91d0581ceebd3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

=D1=87=D1=82, 14 =D1=84=D0=B5=D0=B2=D1=80. 2019 =D0=B3. =D0=B2 02:15, Al= an Third <alan@idio= cy.org>:
On Wed, Feb 13, 2019 at 06:03:51PM +0100, Lars Ingebri= gtsen wrote:
> Evgeny Zajcev <lg.zevlg@gmail.com> writes:
>
> > I've got multi frame image at http://lgarc.narod.ru/gip= hy.mp4
> >
> > And run next code on it:
> >
> >=C2=A0 =C2=A0(let ((ctime (float-time)))
> >=C2=A0 =C2=A0 =C2=A0(setq img (create-image "~/tmp/giphy.mp4&= quot; 'imagemagick nil :scale 1.0))
> >=C2=A0 =C2=A0 =C2=A0(insert-image img)
> >=C2=A0 =C2=A0 =C2=A0(cl-dotimes (index 65)
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0(image-show-frame img index 'nochec= k)
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0(sit-for 0.0))
> >=C2=A0 =C2=A0 =C2=A0(- (float-time) ctime))
> >=C2=A0 =C2=A0=3D=3D> 18.788017988204956
> >
> > 18 seconds to show every frame
>
> Wow, that's slow...

As an aside: for some reason if you run this a second time it doesn=E2=80= =99t
use the already cached images from the first run, so it=E2=80=99s just as s= low
as that first run. I may be misunderstanding how the cache is supposed
to work, but that doesn=E2=80=99t seem right to me.
Cache washes out really fast even if you set `image-cache-evic= tion-delay' to huge value.
In my case, I want to animate 50 i= mages simultaneously and it is not yet possible without tweeks.

--
lg
--0000000000007ad91d0581ceebd3--