Closed Bug 773203 Opened 12 years ago Closed 8 years ago

Animated background-image (gif) is way to slow (due to border-radius and/or box-shadow)

Categories

(Core :: Graphics: ImageLib, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: moz, Unassigned)

References

()

Details

(Keywords: perf, regression)

Attachments

(5 files)

Attached image baustelle.gif
In the given URL there is an animated background gif in the top right corner.
On my system the animation is very slow compared with the single image.
This is a regression, works fine in Fx 3.6, is slow since Fx 4 or 5
There are 1 regression and 2 pertially imploved.
#1 regression: no longer animated (regressed by Bug 359608 )
#2 partially improved: animation fixed, but extremely slow (Bug 595142)
#3 partially improved: slightly improved, but still slow (Bug 588271)

#1 Regression window
Good:
http://hg.mozilla.org/mozilla-central/rev/75d2145d1bd3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre ID:20100907194131
Bad: no longer animated
http://hg.mozilla.org/mozilla-central/rev/4bb022d84a31
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre ID:20100907182227
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=75d2145d1bd3&tochange=4bb022d84a31
Regressed by: Bug 359608

#2 Partially improved
Bad: no longer animated
http://hg.mozilla.org/mozilla-central/rev/3dcf107b7267
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101007 Firefox/4.0b8pre ID:20101007113827
Bad: working again, but extremely slow
http://hg.mozilla.org/mozilla-central/rev/1354806a3b6c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101007 Firefox/4.0b8pre ID:20101007124511
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3dcf107b7267&tochange=1354806a3b6c
Partially fixed by: Bug 595142

#3 Partially improved
Bad: working again, but extremely slow
http://hg.mozilla.org/mozilla-central/rev/7ab0eb4c345b
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101201 Firefox/4.0b8pre ID:20101202051834
Bad: slightly improved, but still slow
http://hg.mozilla.org/mozilla-central/rev/ae06445eeff1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101202 Firefox/4.0b8pre ID:20101202052608
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7ab0eb4c345b&tochange=ae06445eeff1
Partially fixed by: Bug 588271
Blocks: 359608, 595142, 588271
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → ImageLib
The entire page is invalidated for every frame of the gif, and I guess redrawing all those border-radius borders takes up a lot of time.
(In reply to Timothy Nikkel (:tn) from comment #4)
> redrawing all those border-radius borders takes up a lot of time.

The same slowness without border-radius, box-shadow only.
Summary: Animated background-image (gif) is way to slow → Animated background-image (gif) is way to slow (due to border-radius and/or box-shadow)
for better testing
box-shadow is another slow operation.

The real problem is invalidating the whole page when only a small bit has changed.
Keywords: perf
OS: Windows XP → All
Depends on: 818643
20160609130607 Mozilla/5.0 (Windows NT 6.1; rv:50.0) Gecko/20100101 Firefox/50.0

I have tested your issue on latest FF release 47.0 and could not reproduce it but I also tested in latest Nightly build 20160609130607 and  managed to reproduce it.

I have found following regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=8dc18b
f5abac83c7adb2791eb582f1722a244666&tochange=026cf6432f4473549aa6193272764a06be33
a1c3

109:00.02 INFO: Looks like the following bug has the changes which introduced the regression:
https://bugzilla.mozilla.org/show_bug.cgi?id=1204392
> 109:00.02 INFO: Looks like the following bug has the changes which
> introduced the regression:
> https://bugzilla.mozilla.org/show_bug.cgi?id=1204392

added a comment there
Depends on: 1204392
(In reply to roxana.leitan from comment #9)
> I have tested your issue on latest FF release 47.0 and could not reproduce
> it but I also tested in latest Nightly build 20160609130607 and  managed to
> reproduce it.

What testcase were you using to test this with?
Flags: needinfo?(roxana.leitan)
Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0
20160610073607

No testcase works for me, because animation doesn't work at all here:
https://bug773203.bmoattachments.org/attachment.cgi?id=641410
I have reproduced the issue with all attached testcases.
Flags: needinfo?(roxana.leitan)
(In reply to j.j. from comment #12)
> Mozilla/5.0 (Windows NT 5.1; rv:50.0) Gecko/20100101 Firefox/50.0
> 20160610073607
> 
> No testcase works for me, because animation doesn't work at all here:
> https://bug773203.bmoattachments.org/attachment.cgi?id=641410

Filed Bug 1279859
See Also: → 1279859
No longer depends on: 1204392
(In reply to roxana.leitan from comment #13)
> I have reproduced the issue with all attached testcases.

It looks to me like bug 1279859 fixed the issue. Can you confirm that it's fixed with the latest Nightly?
Flags: needinfo?(roxana.leitan)
Hi Seth,

I have tested this issue with latest Nightly build 20160621030208 and I can confirm that it's fixed.
Flags: needinfo?(roxana.leitan)
Closing as WORKSFORME.

This performance issue was fixed some time ago, at least in Fx 47 (comment 9). Tested also with Fx 46 on my old machine (Pentium 4, 500MB RAM).

The recent regression seems unrelated.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: