Closed Bug 1683180 Opened 3 years ago Closed 3 years ago

Severe performance degradation and high CPU usage with zoomed in SVG content

Categories

(Core :: Layout, defect)

Firefox 84
defect

Tracking

()

VERIFIED FIXED
86 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox84 --- wontfix
firefox85 --- verified
firefox86 --- verified

People

(Reporter: chesnokovks, Assigned: MatsPalmgren_bugz)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Steps to reproduce:

https://u8eqg.csb.app/
Zoom in on any icon until it occupies the bulk of the container and zoom out a couple of times, then zoom in again. Now pan by holding down the left click and dragging the mouse around.

Actual results:

Firefox CPU usage skyrockets to 35%, heavy stuttering might be experienced during panning.

Expected results:

Performance and CPU usage should only be marginally affected by the zoom level, (like in Firefox 83 and Chrome 87.0.4280.88).

Most of the time, opening the devtools alleviates the issue for some reason, as does opening the browser in safe mode.
I've managed to reproduce the bug on multiple PCs with Firefox 84.
Though the sandbox is using React is dev mode (which can affect performance), the same applies to the production build.
It's also worth noting that nested SVGs (<svg> inside another <svg> or <symbol> elements like in the sandbox) aggravate performance issues, no matter how simple they are, but the same can be achieved by using basic elements.

Forgot to add, zooming is mouse wheel controlled.

Ran it through mozregression.

Bug 1672527 - Don't update overflow on frames that haven't been reflowed yet. r=emilio
This adds NS_FRAME_FIRST_REFLOW to the frame state flags
we're NOT updating overflow for. This is a minor performance
optimization.
Differential Revision: https://phabricator.services.mozilla.com/D94395

Component: SVG → Layout
Regressed by: 1672527

That's an odd regression-range, but maybe mats has thoughts?

Flags: needinfo?(mats)

Set release status flags based on info from the regressing bug 1672527

I can't reproduce the problem on Linux. The performance seems good (about the same as in Chrome) in both v83 and v84 for me, using clean profiles.
I agree with emilio: it's seems very unlikely that bug 1672527 caused this. Can someone else verify the regression-window please?

Flags: needinfo?(mats)
Attached image mozregression

I actually couldn't reproduce it on Ubuntu either. But three different PCs running Windows 10 x64 were affected. Not sure if helpful, but I added a screenshot of the builds I tested in mozregression (ran it between Firefox 83 an 84).

QA Whiteboard: [qa-regression-triage]

(In reply to Mats Palmgren (:mats) from comment #5)

I can't reproduce the problem on Linux. The performance seems good (about the same as in Chrome) in both v83 and v84 for me, using clean profiles.
I agree with emilio: it's seems very unlikely that bug 1672527 caused this. Can someone else verify the regression-window please?

Hello! I've run a regression range check on Windows 10x64 and it seems that I got the same results as the reporter.
Last good revision: 77c34aa0aaf3b522e2e28e2d2d0ee25a3fa5fc42
First bad revision: fca112f8825ff7ef6c74ade7ed5cd7acc770ac37
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=77c34aa0aaf3b522e2e28e2d2d0ee25a3fa5fc42&tochange=fca112f8825ff7ef6c74ade7ed5cd7acc770ac37

On bad builds, there is heavy stuttering and high CPU usage when zooming or panning which does not occur on good builds.

Has Regression Range: --- → yes
Status: UNCONFIRMED → NEW
Ever confirmed: true

Mats can you take another look?

Flags: needinfo?(mats)
Assignee: nobody → mats
Status: NEW → ASSIGNED

OK, let's just revert that change for now.

Flags: needinfo?(mats)

Comment on attachment 9195278 [details]
Bug 1683180 - Revert bug 1672527 to fix SVG perf regression. r=emilio

Beta/Release Uplift Approval Request

  • User impact if declined: perf regression per bug comments
  • Is this code covered by automated tests?: Unknown
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: see bug
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Just reverts the regressing change.
  • String changes made/needed:
Attachment #9195278 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed1500164454
Revert bug 1672527 to fix SVG perf regression.  r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 86 Branch
QA Whiteboard: [qa-regression-triage] → [qa-regression-triage] [qa-triaged]

The issue is verified fixed using Firefox 86.0a1 (20210105043131) from comment 13 on Windows 10x64. Tested on two different Windows 10x64 machines and the stuttering is no longer occurring while zooming and panning.

Comment on attachment 9195278 [details]
Bug 1683180 - Revert bug 1672527 to fix SVG perf regression. r=emilio

approved for 85.0b5

Attachment #9195278 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified fixed with Firefox 85.0b5 (20210105103416) from comment 16. Tested again on two different Windows10x64 machines and no stuttering is present while zooming and panning.

Status: RESOLVED → VERIFIED
Flags: qe-verify+

(Filed bug 1686725 to figure out the root cause of this regression.)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: