Closed Bug 666449 Opened 13 years ago Closed 2 years ago

Cairo update causes regression in animated gif performance

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows 7
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: jrmuizel, Unassigned)

References

Details

Alice0775 White:

I narrowed down regression range using this exsample http://www.gamepron.com/news/2010/09/07/scott-pilgrim-vs-the-world-free-pixel-art/


CPU(C2Q8300) 2-5%
http://hg.mozilla.org/mozilla-central/rev/2968d19b0165
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100426 Minefield/3.7a5pre ID:20100426040533

CPU 15-25%
http://hg.mozilla.org/mozilla-central/rev/f236632a9747
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100426 Minefield/3.7a5pre ID:20100426084628

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2968d19b0165&tochange=f236632a9747

And I revert in local build.
2968d19b0165 : CPU 6-10%
e3e80935c165 : CPU 7-10%
f236632a9747 :CPU 22-25%

So, Bug 542605 causes the problem
Blocks: 595671
We should compare profiles of both of these builds and see what changed.
Component: Disability Access APIs → ImageLib
QA Contact: accessibility-apis → imagelib
I'm a little surprised that this regression wasn't a blocker for 4-release or 5-release. Animated gifs are used everywhere (especially social media sites, forums, etc.). If your system doesn't have spare cores to handle things not choked by the animated gif problem, then it really kills responsiveness.
(In reply to Mark Straver from comment #2)
> I'm a little surprised that this regression wasn't a blocker for 4-release
> or 5-release. Animated gifs are used everywhere (especially social media
> sites, forums, etc.). If your system doesn't have spare cores to handle
> things not choked by the animated gif problem, then it really kills
> responsiveness.

Another Vote on this. Gif is something from last decade, my modern computer should be able to handle it with ease. Considering it takes less CPU resources to software decode my 1080P H.264 High Profile then some animated Gif.
I'm no cairo guru, but it seems at least an odd problem. What happens is that you are saturating one (and only one) core of whatever machine if there's more than a handful of animated gifs on a page. (quad core seeing 25% CPU, dual core seeing 50% CPU, and if you have a single core machine, your responsiveness goes down the drain with 100% CPU)

I assume (correct me if I'm wrong) that the cairo library is multithreaded; it would not make much sense that the load stays limited to one core then, unless it's some sub-process that -all- animated gif threads have to wait on, something that has only one copy of it running on one CPU thread... Right? Does that narrow down the causes?
(In reply to Mark Straver from comment #4)
> I assume (correct me if I'm wrong) that the cairo library is multithreaded;
> it would not make much sense that the load stays limited to one core then,
> unless it's some sub-process that -all- animated gif threads have to wait
> on, something that has only one copy of it running on one CPU thread...
> Right? Does that narrow down the causes?

Cairo is not multi-threaded, so it may very well be something inside Cairo.
QA Contact: imagelib → jmuizelaar
I've been following several other bugs (bug 615063, bug 666446), and this one should be marked as a duplicate of bug 666446, I think, seeing FF11 builds that implement cairo fixes take care of this problem.
Definitely fixed by bug 666446, so resolving this fixed.  If someone believes it should instead be dup'ed to something else or whatever, go for it.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Oops.  Sorry Jeff. Missed that you are actually assigned to look into something specific to this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I wonder if this bug is what I'm seeing here:

http://popcorn.webmadecontent.org/iln

Chrome seems to have no problem, but FF 18.0.1 on Mac 10.6.8 is really choppy and slow playing the GIFs

Should I file a new bug or is this related?
I woyld say a new bug until we can determine the exact problem.
I've filed bug 836167.
Severity: normal → S3

The severity field for this bug is relatively low, S3. However, the bug has 23 votes.
:aosmond, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(aosmond)

We don't use cairo for drawing animated images anymore.

Status: REOPENED → RESOLVED
Closed: 12 years ago2 years ago
Resolution: --- → FIXED

The last needinfo from me was triggered in error by recent activity on the bug. I'm clearing the needinfo since this is a very old bug and I don't know if it's still relevant.

Flags: needinfo?(aosmond)
You need to log in before you can comment on or make changes to this bug.