Open Bug 1708408 Opened 4 years ago Updated 2 years ago

Up to 50% CPU load for animated (job is running) SVG on Github Actions page

Categories

(Core :: Graphics: WebRender, defect)

defect

Tracking

()

People

(Reporter: whimboo, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: power)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0 ID:20210421212740

Seen today while observing status of running CI jobs for the Puppeteer repository. Firefox uses the CPU up to 50% on the main process, whereby most of it is all in Rendering.

Here a profile while 5 jobs were running:
https://share.firefox.dev/3aPXrvH

Note that Safari consumes less than 10% CPU at the same time (with all the jobs running).

Blocks: power-usage
Keywords: power

Oh and the page that I had open at this time was:
https://github.com/puppeteer/puppeteer/actions/runs/795407508

Henrik, this profile doesn't show any significant work on the Renderer thread. The composite times are around 5ms. Is this the right profile?

Severity: -- → S3
Flags: needinfo?(hskupin)

Yes it is. And the problem on this page is the animated SVG with the class name anim-rotate.

      <svg width="92%" height="92%" fill="none" viewBox="0 0 16 16" class="anim-rotate" xmlns="http://www.w3.org/2000/svg">
        <path opacity=".5" d="M8 15A7 7 0 108 1a7 7 0 000 14v0z" stroke="#dbab0a" stroke-width="2"></path>
        <path d="M15 8a7 7 0 01-7 7" stroke="#dbab0a" stroke-width="2"></path>
        <path d="M8 12a4 4 0 100-8 4 4 0 000 8z" fill="#dbab0a"></path>
      </svg>

The animation is specified as:

.anim-rotate {
    animation: rotate-keyframes 1s linear infinite;
}

By default when the actions are running there are 9 of these SVGs displayed.

Flags: needinfo?(hskupin)
Summary: Up to 50% CPU load with running jobs on Github Actions page → Up to 50% CPU load for animated (job is running) SVG on Github Actions page

I'm still not seeing in the Profile that we are spending any significant time here. Renderer spends 70% of time waiting for messages, 20% of time waiting for GPU work to be done, and only 10% of time recording commands. Maybe the profile needs to include the content process, to see this SVG workload?

Flags: needinfo?(hskupin)

Dzmitry had a look at it himself last Friday after I triggered those jobs of the before-mentioned Github Actions page. Maybe he can explain himself.

But I still see that way higher overall CPU load compared to Safari.

Flags: needinfo?(hskupin) → needinfo?(dmalyshau)

Sorry for responding this late!
I think there are no obvious offenders in this profile. I'd classify it under the general "we need to cache things better and avoid doing more work" bin, similar to 1647073. It can be addressed by a number of non-trivial measures, such as

  • DL interning, better picture caching
  • restructuring the way Gecko DLs are built
  • faster frame building, better partial presentation
Blocks: wr-perf
Flags: needinfo?(dmalyshau)
Blocks: wr-frame-building
No longer blocks: wr-perf
You need to log in before you can comment on or make changes to this bug.