Open Bug 1683300 Opened 4 years ago Updated 2 years ago

[meta] High CPU load (40% - 100%) caused by the top extensions loading animation on https://code.visualstudio.com/docs/

Categories

(Core :: Graphics: WebRender, defect, P3)

defect

Tracking

()

Performance Impact medium

People

(Reporter: whimboo, Unassigned)

References

(Depends on 2 open bugs)

Details

(4 keywords)

Attachments

(3 files, 1 obsolete file)

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

Having the page https://code.visualstudio.com/docs/?dv=osx open in the currently selected tab causes a permanent high CPU load (40 - 100%) of the MainThread.

This is actually a new regression and I can see this first with the Firefox 84 release. Using 83.0 the CPU load is around 7% only.

Let me run mozregression to find the causing change.

The problem here is actually the loading animation under Top Extensions. As it looks like whatever should be displayed there does not finish loading, and causes this high CPU load. Disabling JavaScript for that domain via NoScript makes it go away.

If you are not seeing this problem because the top extensions list will be loaded please just add the following node to the DOM:

<div class="loading"></div>

Doing the same in Safari I see no CPU load.

Summary: High CPU load (40% - 100%) on MainThread with https://code.visualstudio.com/docs/?dv=osx open → High CPU load (40% - 100%) caused by the top extensions loading animation on https://code.visualstudio.com/docs/

With Firefox 78 the CPU load is only around 20% but still high. So not sure if that is a regression per se.

Steps:

  1. Load https://code.visualstudio.com/docs/?dv=osx
  2. Open devtools and run the following code in the console:
var main = document.getElementById("main");
var div = document.createElement("div");
div.className = "loading";
main.appendChild(div);
  1. Scroll down until the load animation is visible.

Moving bug over to the Performance component for triaging.

Component: General → Performance
Version: Firefox 84 → Trunk

Here a gecko profile with all threads and IPC messages enabled: https://share.firefox.dev/3h17cJo

As it looks like Emilio and Olli cannot see this on Linux. Markus, given that you are on MacOS do you have a chance to check? Thanks.

Flags: needinfo?(mstange.moz)

I can reproduce this.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Flags: needinfo?(mstange.moz)
Attached file testcase with loading SVG (obsolete) (deleted) —

Instruments profile: https://drive.google.com/file/d/1K823Ql4Dv99Pm1Uf0CkQ_3M4UyADcCkU/view?usp=sharing

I'm planning to file bugs for the individual pieces I found in there, on Monday.

Whiteboard: [qf]

Markus: Could you please link the bugs that you mentioned in comment #11 and set a priority/severity for this bug?

Flags: needinfo?(mstange.moz)

Actually I'll move this into the Graphics component, IIRC all the issues here were gfx issues.

I'll have to look at the profiles and testcases again to remember what I found.

Component: Performance → Graphics: WebRender
Flags: needinfo?(mstange.moz)
OS: Unspecified → All
Hardware: Unspecified → All

Ticking needinfo to remind you to do that. :)

Flags: needinfo?(mstange.moz)
Whiteboard: [qf] → [qf:p2:resource]
Depends on: 1688086

The one dependent bug has been fixed. Markus, did you already file the other ones but maybe missed to add the dependency?

I still need to file them. It's on my list.

Flags: needinfo?(mstange.moz)
Depends on: 1690621
Depends on: 1689215
Depends on: 1690653
Depends on: 1690654
Depends on: 1690690
Depends on: 1690692

I have now filed everything I could find. In order of priority, I think bug 1688086 was the most important (and is now fixed), bug 1690621 is the next most important, and then bug 1689215.

Assignee: mstange.moz → nobody
Status: ASSIGNED → NEW
Keywords: meta
Summary: High CPU load (40% - 100%) caused by the top extensions loading animation on https://code.visualstudio.com/docs/ → [meta] High CPU load (40% - 100%) caused by the top extensions loading animation on https://code.visualstudio.com/docs/
No longer blocks: power-usage
Severity: -- → S3
Priority: -- → P3
Performance Impact: --- → P2
Whiteboard: [qf:p2:resource]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: