Closed Bug 970927 Opened 10 years ago Closed 11 months ago

High power consumption on Forbes while idling, with CSS transition on 'transform' for an element inside of a "top: 3000px" subtree

Categories

(Core :: Layout, defect, P4)

defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: rvitillo, Unassigned)

References

()

Details

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

Attachments

(2 files)

Firefox is consuming an excessive amount of CPU resources while idling on Forbes.com compared to Chrome on Linux.
Attached file Testcase 1
It seems that when a CSS animation is not visible (i.e. it's positioned outside of the viewport), Chrome does a better job at reducing the number of instructions executed. Both FF and Chrome have about 50-60 wakeups/sec on OSX but the latter does much less work per wakeup.
Component: General → Layout
Product: Firefox → Core
See bug 962594 comment 9 though.
Depends on: 962594
Keywords: perf, testcase
Priority: -- → P4
Hardware: x86 → All
Summary: High power consumption on Forbes while idling → High power consumption on Forbes while idling, with CSS transition on 'transform' for an element inside of a "top: 3000px" subtree
I'm not sure we can easily optimize away any wakeups (refresh driver ticks) here, since the property being animated in those ticks ("transform") could be animated to a value (like "translatey(-3000px)") that would put the element in view.  And we can't find out whether it's got such a value without actually evaluating the animation (ticking).
[Note that the dependency on bug 962594 may end up being weak; in that bug, the animated content is "display:none" and hence much easier to prove non-visible/non-layout-impacting, as compared to the abspos content  in this bug's testcase.

However, I suppose it's likely that bug 962594 will be fixed before this bug is, since it's more straightforward; and if we can come up with a fix here, it's feasible that it might share some of the mechanics. So maybe the dependency makes sense.]
We'll do a lot less work on animations of transforms once we have OMT Animations turned on on platforms other than B2G.  Other than that I'm not sure what to do about this.
Whiteboard: [Power]
I took measurements of the attached test with |mach power| on Mac.

Nightly:

>     total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01  5.12 W =  3.75 ( 0.59 +  0.00 +  3.16) +  1.37 W
>
> 1 sample taken over a period of 30.000 seconds
>
> Name                               ID     CPU ms/s  User%  Deadlines (<2 ms, 2-5 ms)  Wakeups (Intr, Pkg idle)  GPU ms/s
> com.apple.Terminal                 239    269.99                                      78.94   67.28             0.00    
>   plugin-container                 33665  194.72    93.66  2.40    2.07               9.93    7.60              0.00    
>   firefox                          33664  70.80     74.92  6.53    0.10               68.61   59.41             0.00    
>   Terminal                         446    5.24      92.59  0.00    0.00               0.37    0.27              0.00    
> kernel_coalition                   1      11.43                                       44.62   28.29             0.00    
>   kernel_task                      0      8.95      0.00   4.20    0.03               44.52   28.22             0.00 
> com.apple.WindowServer             69     0.66                                        0.30    0.27              0.48    
>   WindowServer                     144    0.66      23.58  0.07    0.07               0.30    0.27              0.48    

Chrome:

>     total W = _pkg_ (cores + _gpu_ + other) + _ram_ W
> #01  3.50 W =  2.19 ( 0.09 +  0.02 +  2.08) +  1.31 W
>
> 1 sample taken over a period of 30.000 seconds
>
> Name                               ID     CPU ms/s  User%  Deadlines (<2 ms, 2-5 ms)  Wakeups (Intr, Pkg idle)  GPU ms/s
> com.google.Chrome                  354    34.52                                       52.58   43.55             0.28    
>   Google Chrome Helper             33699  33.51     63.23  1.30    0.00               51.02   42.72             0.00
>   Google Chrome Helper             33693  0.81      47.19  0.00    0.00               0.20    0.20              0.28    
>   Google Chrome                    33688  0.69      61.85  0.30    0.00               1.37    0.63              0.00    
> kernel_coalition                   1      14.15                                       48.58   41.35             0.00    
>   kernel_task                      0      11.71     0.00   4.70    0.00               48.49   41.25             0.00    
> com.apple.WindowServer             69     1.60                                        0.70    0.63              1.64    
>   WindowServer                     144    1.60      41.00  0.10    0.03               0.70    0.63              1.64

Safari failed to load the test.

So we're a bit worse than Chrome, but not a lot, and 5 W is not that far from the floor of 3.5 W on my laptop.
Whiteboard: [Power] → [Power:P3]
Severity: normal → S3

Daniel, given that this bug is around 8 to 9 years old I would suggest to close it as incomplete. What do you think?

Flags: needinfo?(dholbert)

Yeah. I'm not seeing a substantial perf difference (in terms of top usage) between Firefox and Chrome (or particularly high CPU usage from Firefox) here. Let's close as incomplete for now.

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

Attachment

General

Created:
Updated:
Size: