Pseudo-animated single frame GIF files lead to frequent redraws
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
People
(Reporter: iam, Assigned: tnikkel)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:105.0) Gecko/20100101 Firefox/105.0
Steps to reproduce:
- Open the attached still image GIF file with 10 ms delay between frames
- Check CPU and GPU utilization (and also hardware interrupts on Windows)
Actual results:
Firefox 105.0.1 on Windows 10 consumes 6-10% of CPU while displaying this file, because it tries to "animate" the still image and requests its redraws every 10 ms (100 fps.).
Expected results:
Firefox should treat "animated" GIFs with only one frame as a still image and do not try to redraw it.
The previous file is a one frame animated gif with 10 ms delay between the frames, "play once".
This file is the same file but with "loop forever" flag. It consumes roughly twice as much as the previous one, mostly creating GPU interrupts load.
This file does not have animation and does not create additional CPU/GPU load.
Comment 3•2 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
https://share.firefox.dev/3Svp2pV
Notice "RefreshDriverTick" with "Tick Reasons: HasImageAnimations".
Assignee | ||
Comment 5•2 years ago
|
||
This is basically bug 1744499 but this has more testcases. The basic problem is that we don't really consider the case of finitely animating images and treat them all like infinite looping.
Assignee | ||
Updated•2 years ago
|
Comment 6•2 years ago
|
||
We should probably treat one-frame gifs as non-looping.
And then just handle non-looping properly.
This is an energy-use concern that likely does impact users in a way that they can't anticipate, so I'm going with S2 here, but we can dial that back if we think this is more rare that I fear. I worry about this being a source of Firefox-drains-my-laptop-battery papercuts.
+gfx-triage, so we can chat about this.
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Specifically, @jrmuizel thinks it's unlikely to be causing (major) battery issues, and that it is likely a rare case, thus S2->S3.
Description
•