Closed Bug 1675431 Opened 4 years ago Closed 2 years ago

When building with newer macOS SDKs, there is worse graphical performance than there is with the 10.11 SDK (both with WebRender enabled)

Categories

(Core :: Performance, defect, P3)

Firefox 84
Desktop
macOS
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: lolrepeatlol, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0

Steps to reproduce:

I built Firefox with the macOS 11.0 SDK.

I clicked the new tab button.

Actual results:

I noticed that it had worse graphics performance than Firefox Nightly (84) downloaded from mozilla.org.

Expected results:

The graphics performance should have stayed the same.

Notice the animation on the new tab in the video I attached. It is much choppier and the WebRender profiler also seems to show more activity. I also quickly force disabled WebRender in about:config and noticed that the new tab animation wasn't choppy anymore.

Disclaimer: I am on a Ryzen Hackintosh which has graphical issues such as worse graphics performance. I apologize if this does not happen on normal Macs.

Specs if it helps:

  • CPU: AMD Ryzen 7 1700
  • Motherboard: MSI B350 PC Mate
  • 16GB RAM
  • GPU: Gigabyte Radeon RX 5700 XT
  • Software: OpenCore 0.6.2, macOS Big Sur 11.0.1 Beta (build 20B5012d, enrolled in Apple Public Beta Software Program), latest version of experimental AMD patches

Well, Bugzilla says my attachment is too big, so I'm sending a link instead: https://streamable.com/pknaa8

Also, here's another test: I tried the testufo.com website to see if there was any visible performance difference. To me, there wasn't, however, one thing that is noticeable is that Firefox built with the 11.0 SDK has more GPU activity as one can see in the WebRender profiler. https://streamable.com/fvzqg9

Summary: When building with newer SDKs, there is worse performance than there is with the 10.11 SDK (both with WebRender enabled) → When building with newer macOS SDKs, there is worse performance than there is with the 10.11 SDK (both with WebRender enabled)

I am unsure which SDK this issue starts on.

Component: Untriaged → Performance
OS: Unspecified → macOS
Product: Firefox → Core
Hardware: Unspecified → Desktop

Also, I suggest that someone should put that this blocks bug 1670751. ;)

Summary: When building with newer macOS SDKs, there is worse performance than there is with the 10.11 SDK (both with WebRender enabled) → When building with newer macOS SDKs, there is worse graphical performance than there is with the 10.11 SDK (both with WebRender enabled)

The performance difference might not be due to the SDK, it might be something else. To confirm that it is due to the SDK, you would need to compare two local builds with different SDKs.

My guess is that the difference is due to --enable-release, which is off by default for local builds. You can enable it by adding the following line to your mozconfig:

ac_add_options --enable-release

This turns on a higher optimization level for rust code, and it enables link time optimization. And especially the latter makes the build process a lot slower.
Alternatively, you can override just the rust optimization level with this:

export RUSTC_OPT_LEVEL=2

That's what I do - it provides acceptable rust optimization without severely degrading link times.

Neither of these flags seem to be listed in the build options documentation, which is rather surprising to me.

I've filed bug 1675875 on the lack of documentation for this.

Severity: -- → S4
Priority: -- → P3

Closing as per Markus comment.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.