Bug 305072 - Animated GIF is some milliseconds too slow
Summary: Animated GIF is some milliseconds too slow
Status: CONFIRMED
Alias: None
Product: gwenview
Classification: Applications
Component: general (show other bugs)
Version: 20.04.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL: http://i.imgur.com/bmf71.gif
Keywords: reproducible
: 367868 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-13 10:39 UTC by Marvin Reimer
Modified: 2021-08-05 13:13 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
60 seconds countdown analog clock (1.23 MB, image/gif)
2019-11-08 22:41 UTC, Ancoron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marvin Reimer 2012-08-13 10:39:39 UTC
Animated GIFs animation is some milliseconds too slow. Especially if you compare animation speed with major browsers like Chrome or Firefox. Also other image viewers like e.g. Mirage are faster with the animation speed.

Reproducible: Always

Steps to Reproduce:
1. Open and save image from url: http://i.imgur.com/bmf71.gif
2. Wait till the browser (Firefox or Chrome) loaded the GIF completely.
3. Compare animation speed. This effect is also visible with various other animated GIFs.
Actual Results:  
Firefox, Chrome and Mirage show animated GIF faster. Gwenview is slower.

Expected Results:  
Gwenview and Firefox, Chrome, Mirage have the same GIF animation speed.

I'm using the Unity desktop (Ubuntu 11.10), but I've seen this effect also on pure KDE desktops like Kubuntu and also with newer versions of Gwenview.
Comment 1 JR 2014-01-01 20:52:24 UTC
Still prevalent in gwenview 4.12.0.
Comment 2 null 2018-04-04 19:36:14 UTC
*** Bug 367868 has been marked as a duplicate of this bug. ***
Comment 3 null 2018-04-04 19:36:52 UTC
Still an issue with a recent Gwenview. More notes:
- In Bug 367868 the animation speed seems to depend on the window size.
- For me, even Firefox and Chromium have different speeds, i.e. Firefox is faster than Chromium, which is faster than Gwenview.
- Might be worth checking whether only Gwenview is affected, or other Qt apps as well.
Comment 4 Gustavo Alvarez 2018-05-06 20:55:49 UTC
any notice of this bug?

18.04.0 is still affected
Comment 5 Colin Griffith 2019-04-06 09:17:57 UTC
Open a large gif, and Gwenview also skyrockets in RAM usage. It's as if it's keeping every frame in memory, including each loop as new frames it generates instead of reusing them.

This is a serious issue.
Comment 6 Colin Griffith 2019-04-06 09:18:35 UTC
By the way, by large I mean resolution-wise.
Comment 7 Ancoron 2019-11-08 22:41:10 UTC
Created attachment 123801 [details]
60 seconds countdown analog clock

I've also did some tests here using the attached 60-seconds-countdown.gif file.

It really should be 60 seconds in playback length (by ImageMagick):

$ identify -format ' + %T' 60-seconds-countdown.gif | sed 's/^/(0/; s/$/) \/ 100\n/' | bc -l
60.00000000000000000000

However, with Gwenview (up to 19.04.3), I got the following playback times (manually tracked, not precise to the deci-second) related to Gwenview window resolution:

 256x256  - 01:20 (probably due to additional scaling)
 512x512  - 01:16
1024x1024 - 01:30
2560x1600 - 03:45

Another thing I noticed was that reloading/restarting the GIF (using F5 key) the playback speed slowed down even more and the CPU usage went up.

After 10 reloads, gwenview was using ~80% of a single CPU core and slowed down playback from ~01:30 initially to ~05:24 (at 1024x1024 window size), after 20 reloads to ~09:20 at ~88).
Comment 8 Colin Griffith 2020-04-15 23:51:43 UTC
I'm now relatively convinced that this is, in part, caused by bug 420141 (which I just filed today). However, I'm noticing that even on gifs with alpha transparency, there's STILL a small amount of slowdown - just not nearly as much. So while I think that bug helps get to the root of the problem, there's still something else going on here.
Comment 9 ariasuni 2020-05-08 18:38:07 UTC
If I open gwenview, then open several gifs successively, I don’t observe any memory leak (at least not anything easily noticeable). However, any gif is played really slowly (Gwenview 20.04.0, Arch Linux).
Comment 10 karolbienkowski 2020-08-08 13:09:04 UTC
I'm on Manjaro with Gwenview 20.04.3. This one gets more interesting.

If I launch a gif from, lets say, Dolphin then it is slow.
But other then that, every time I load a gif for the first time, it runs fine. For example, when I go to the next gif (arror keys or the 'next' button) or launch a gif from Gwenview explorer view.
This works only once, because if I go back to the same gif (even with arrows, or explorer view) it's slow now.
Comment 11 camille 2021-08-05 13:13:20 UTC
As of Gwenview 19.12.3, this bug is still present.
While launching the 60 second clock gif image in a correctly behaving player (here Firefox 90.0.2, or Nomacs 3.12) and Gwenview at the same time, the result is that it's not just some milliseconds behind, but twice as slow.