Closed Bug 1935149 Opened 1 year ago Closed 1 year ago

14.04 - 8.15% wikipedia ContentfulSpeedIndex / wikipedia fcp + 20 more (Windows) regression on Thu November 28 2024

Categories

(Core :: Graphics: Text, defect)

defect

Tracking

()

RESOLVED FIXED
136 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox133 --- unaffected
firefox134 --- unaffected
firefox135 --- wontfix
firefox136 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: jfkthame)

References

(Regression)

Details

(Keywords: perf, perf-alert, regression)

Attachments

(1 file)

Perfherder has detected a browsertime performance regression from push 91e11316d48cf2231d097057e123a01bd78aa7cb. As author of one of the patches included in that push, we need your help to address this regression.

Regressions:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
14% wikipedia ContentfulSpeedIndex windows11-64-shippable-qr cold fission webrender 474.96 -> 541.65 Before/After
14% wikipedia FirstVisualChange windows11-64-shippable-qr cold fission webrender 474.96 -> 541.49 Before/After
14% wikipedia PerceptualSpeedIndex windows11-64-shippable-qr cold fission webrender 477.20 -> 543.98 Before/After
14% wikipedia SpeedIndex windows11-64-shippable-qr cold fission webrender 480.67 -> 547.87 Before/After
14% wikipedia loadtime windows11-64-shippable-qr bytecode-cached fission warm webrender 219.15 -> 249.01 Before/After
13% google-slides ContentfulSpeedIndex windows11-64-shippable-qr bytecode-cached fission warm webrender 457.68 -> 519.16 Before/After
12% wikipedia largestContentfulPaint windows11-64-shippable-qr cold fission webrender 531.26 -> 594.92 Before/After
11% wikipedia ContentfulSpeedIndex windows11-64-shippable-qr bytecode-cached cold fission webrender 490.49 -> 546.69 Before/After
11% wikipedia PerceptualSpeedIndex windows11-64-shippable-qr bytecode-cached cold fission webrender 492.61 -> 549.01 Before/After
11% wikipedia FirstVisualChange windows11-64-shippable-qr bytecode-cached cold fission webrender 490.49 -> 546.52 Before/After
... ... ... ... ... ...
10% wikipedia LastVisualChange windows11-64-shippable-qr fission warm webrender 570.35 -> 624.56 Before/After
9% wikipedia fcp windows11-64-shippable-qr bytecode-cached cold fission webrender 346.82 -> 377.97 Before/After
9% wikipedia loadtime windows11-64-shippable-qr bytecode-cached cold fission webrender 639.90 -> 695.22 Before/After
9% wikipedia LastVisualChange windows11-64-shippable-qr bytecode-cached cold fission webrender 1,015.28 -> 1,101.84 Before/After
8% wikipedia fcp windows11-64-shippable-qr cold fission webrender 344.40 -> 372.47 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests. Please follow our guide to handling regression bugs and let us know your plans within 3 business days, or the patch(es) may be backed out in accordance with our regression policy.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run all of these tests on try with ./mach try perf --alert 42944

The following documentation link provides more information about this command.

For more information on performance sheriffing please see our FAQ.

If you have any questions, please do not hesitate to reach out to aesanu@mozilla.com.

Flags: needinfo?(emilio)

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

I suspect this is the page being very sensible to viewport size... Which my patch changes slightly.

Do you know how do we set up these tests? Do they use the default window size or do we try to get a consistent viewport size?

Flags: needinfo?(gmierz2)

I confirmed that my patch changes the viewport size slightly, and I'm moderately sure given this only affects wikipedia effectively that this is the cause...

That said, I see something worth digging in the profiles. Jonathan, I see two massive reflows on the bad load, while only one on the good load. Looking at them, they are forced by gfxPlatformFontList::ForceGlobalReflowLocked, but they come from two different messages:

  • One from RecvFontListChanged, from here.
  • Another one from RecvRebuildFontList a bit later (from LoadCMapsRunnable if I'm reading it correctly).

The bad load also gets these, they just happen to arrive in the same rendering loop tick so they don't do the work twice.

My understanding is that the first one is only sent from CancelInitOtherFamilyNamesTask()... I wonder if we can avoid it if we're going to run something else again? That'd probably fix the regression here...

Flags: needinfo?(emilio) → needinfo?(jfkthame)

We use an orange paint/frame to determine the viewport that we should analyze for the visual metrics. So if browser viewport changes, then the analysis uses a slightly different viewport size. In the original video artifacts you can see that orange frame painted at the start of the test.

Flags: needinfo?(gmierz2)

I guess it ought to help if CancelInitOtherFamilyNamesTask() were to check for the existence of a non-null mLoadCmapsRunnable, and skip calling BroadcastFontListChanged() if one is present.

I pushed this to tryserver and it appears to have the desired effect: https://treeherder.mozilla.org/perfherder/compare?originalProject=try&originalRevision=19586e7ec5277c3d839b8f2d9f2ec0691fcfeb30&newProject=try&newRevision=92a3a64669ba2fce6f003f3abc0056aac6c525a2&framework=13&page=1&filter=wikipedia&showOnlyImportant=1

Let me think a bit about whether that seems ok to do in general, or if it's liable to bite us in some other way...

Flags: needinfo?(jfkthame)

Merge the FontListChanged message sent by the parent when the list is updated
with the more general ForceGlobalReflow. Avoid forcing an update from the
InitOtherFamilyNames task if there is also a LoadCmaps operation in progress;
just ensure it will include the NeedsReframe flag in its message instead.

This should not change observable behavior, but aims to reduce the risk of
font data updates resulting in redundant multiple reflows.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e1a2b6301950 Streamline IPC messaging related to font-list updates. r=layout-reviewers,emilio
Attachment #9443638 - Attachment description: Bug 1935149 - Streamline IPC messaging related to font-list updates. r=#layout → Bug 1935149 - Streamline IPC messaging related to font-list updates.
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4de847c4b4f9 Streamline IPC messaging related to font-list updates. r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 136 Branch
Regressions: 1941449
Flags: needinfo?(jfkthame)

(In reply to Narcis Beleuzu [:NarcisB] from comment #11)

https://hg.mozilla.org/mozilla-central/rev/4de847c4b4f9

Perfherder has detected a browsertime performance change from push 4de847c4b4f9799abdf6302e7c0a915e9e11a7e8.

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
17% wikipedia largestContentfulPaint windows11-64-shippable-qr cold fission webrender 583.07 -> 485.33 Before/After
16% wikipedia largestContentfulPaint windows11-64-shippable-qr bytecode-cached cold fission webrender 593.42 -> 500.21 Before/After
14% wikipedia loadtime windows11-64-shippable-qr bytecode-cached cold fission webrender 689.50 -> 592.32 Before/After
13% wikipedia loadtime windows11-64-shippable-qr cold fission webrender 674.15 -> 584.77 Before/After
13% wikipedia PerceptualSpeedIndex windows11-64-shippable-qr bytecode-cached cold fission webrender 535.25 -> 466.99 Before/After
... ... ... ... ... ...
10% wikipedia LastVisualChange windows11-64-shippable-qr bytecode-cached cold fission webrender 1,091.98 -> 978.60 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a sheriff to do that for you.

You can run these tests on try with ./mach try perf --alert 43357

For more information on performance sheriffing please see our FAQ.

The patch landed in nightly and beta is affected.
:jfkthame, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval. Also, don't forget to request an uplift for the patches in the regression caused by this fix.
  • If no, please set status-firefox135 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(jfkthame)
Flags: needinfo?(jfkthame)
Component: Widget: Win32 → Graphics: Text
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: