Closed Bug 972473 Opened 10 years ago Closed 3 years ago

High power consumption with Google+ button

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: rvitillo, Unassigned)

References

Details

(Keywords: power, Whiteboard: [Power:P3])

Attachments

(2 files)

Firefox seems to be consuming more energy than Chrome when idling on Answers.com.
Attached file Testcase 1
Turns out the culprit is the google plus (+1) button. The test-case exhibits an animated svg which is completely covered by an opaque element. Both browsers generate about 60 wakeup per seconds but chrome is much more efficient, i.e. FF is consuming about 11% of CPU while Chrome only 2%.

It turns out that even if we remove the opaque element that hides the svg animation Chrome does a better job at animating the spinning wheel, i.e. 21% of CPU consumption for FF and only 12% for Chrome. I will file another bug for this finding.
Component: General → Layout
Product: Firefox → Core
Summary: High power consumption on Answers.com while idling → High power consumption with Google+ button
I've been hunting down a problem on faz.net where every open (idle) tab adds to CPU load - ~20% per tab.

Example http://www.faz.net/aktuell/gesellschaft/kriminalitaet/kinder-duerfen-ihre-vaeter-im-gefaengnis-besuchen-13702897-p2.html

4 times a second a callback happens that chews away for no (end user) apparent reason. The button is in an iframe in this case if that matters.

<div class="col gP">

    <div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; background: tra… baseline; display: inline-block; width: 32px; height: 20px;">
        <iframe id="I0_1437065787702" width="100%" frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 32px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" name="I0_1437065787702" data-gapiattached="true" title="+1" src="https://apis.google.com/u/0/se/0/_/+1/fastbutton?usegapi=1&a…02&parent=http%3A%2F%2Fwww.faz.net&pfname=&rpctoken=YYYY">
            #document
                <!DOCTYPE html>
                <html lang="de" dir="ltr">

    <head></head>
    <body class="kv8eNc ">
        <div id="root">
            <script></script>
            <script type="text/javascript"></script>
            <div id="plusone" class="Jg" dir="ltr">
                <span id="widget_bounds">
                    <div class="dIa">
                        <div id="button" class="FP HP Gib Ina mEc" tabindex="0" role="button" title="" style="height:20px;width:32px;" aria-label="Klicken Sie, um hierfür als XXX (XXXX@gmail.com) öffentlich +1 zu geben" aria-pressed="false">

                                            <div class="Ul">
                                                <div class="s7" style="margin:0px 0px 0 0px;">
                                                    <svg class="u7 uzlpSb" viewBox="-5 -3 30 18" height="18px" width="30px" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" version="1.1">
                                                        <path d="m13,3-1,0 0,2-2,0 0,1 2,0 0,2 1,0 0-2 2,0 0-1-2,0zm3-1 0,1 1.525,0 0,7 1.475,0 0-9z"></path>
                                                        <path d="m5.286,4.594c.6738-.7371 .4033-1.8668 .0644-2.6978-.3285-.85…31-.2764,.2346-.5192,.5532-.8164,.736-.253,0-.506,0-.7591,0z"></path>
                                                        <path d="m5.286,4.594c.6738-.7371 .4033-1.8668 .0644-2.6978-.3285-.85…31-.2764,.2346-.5192,.5532-.8164,.736-.253,0-.506,0-.7591,0z"></path>
                                                    </svg>
                                                    <div class="xuwmvb xuwmvb-yaNpec"></div>
                                                </div>
                                            </div>
                                            <div class="GP"></div>
                                            <div class="q7"></div>
                                        </div>
                                    </div>
                                </span>
                            </div>
                            <script type="text/javascript"></script>
                        </div>
                        <script></script>
                        <script></script>
                    </body>
                </html>
            </html>
        </iframe>
    </div>


adblocking http://apis.google.com/js/plusone.js results in 0% cpu usage

This is on Linux Mint, Firefox 39
Whiteboard: [Power]
Power:P3 because bbirtles says SVG animations aren't that important.
Whiteboard: [Power] → [Power:P3]

I cannot observe the problem with the attached test case. The power usage of Firefox on the main process is low, and webrender specific threads don't use certain amount of CPU. Also Google+ is no more, so it's not possible to test that button in reality anymore.

Daniel, do you still see anything obvious here, or shall we close this bug? It might have been fixed in the past 6 years.

Flags: needinfo?(dholbert)

Yeah, I'm not seeing any appreciable amount of CPU usage here with the attached testcase either. Let's call this WFM.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(dholbert)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: