Closed Bug 1946365 Opened 2 months ago Closed 1 month ago

176.65 - 2.37% damp console.typing / damp simple.webconsole.reload.DAMP + 2 more (Windows) regression on Mon February 3 2025

Categories

(Core :: Widget: Win32, defect)

defect

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox-esr128 --- unaffected
firefox135 --- unaffected
firefox136 --- unaffected
firefox137 --- fixed

People

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

References

(Regression)

Details

(4 keywords)

Attachments

(2 files)

Perfherder has detected a devtools performance regression from push fd544deaa5843da8f38108de96bd6a27e0c0be2e. 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)
177% damp console.typing windows11-64-shippable-qr e10s fission stylo webrender 367.19 -> 1,015.84
41% damp console.autocomplete windows11-64-shippable-qr e10s fission stylo webrender 360.63 -> 510.00
6% damp console.autocomplete.longInput windows11-64-shippable-qr e10s fission stylo webrender 477.89 -> 506.05
2% damp simple.webconsole.reload.DAMP windows11-64-shippable-qr e10s fission stylo webrender 186.85 -> 191.27

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 43651

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 fbilt@mozilla.com.

Flags: needinfo?(emilio)

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

Huh, that's some massive regressions indeed. Possibly the popup creation time is worse? Can we have profiles of this?

Flags: needinfo?(emilio) → needinfo?(fbilt)
Severity: -- → S2

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

Huh, that's some massive regressions indeed. Possibly the popup creation time is worse? Can we have profiles of this?

Generated the performance profiles for both the before and after jobs, they should be available soon. Let me know via :ni if they don't show up.

Flags: needinfo?(emilio)

Ok so took a look at the profiles:

and what I can see is that there's a bunch of FillRgn that wasn't there before which is not totally unexpected given the change. That said, I suspect bug 1945894 will help here. If it doesn't restore the regression to previous values we can look into it more.

But also, I'm curious, what is this test measuring exactly? The difference in the profiles doesn't look so massive? (As in, the first item on the table is a 200% regression...)

Depends on: 1945894
Flags: needinfo?(emilio) → needinfo?(nchevobbe)
Flags: needinfo?(fbilt)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #4)

Ok so took a look at the profiles:

and what I can see is that there's a bunch of FillRgn that wasn't there before which is not totally unexpected given the change. That said, I suspect bug 1945894 will help here. If it doesn't restore the regression to previous values we can look into it more.

But also, I'm curious, what is this test measuring exactly? The difference in the profiles doesn't look so massive? (As in, the first item on the table is a 200% regression...)

focused the profiles on the console.typing test:

The test simulate typing a string char by char, triggering the autocomplete https://searchfox.org/mozilla-release/rev/8647b34112bf8f1ea2d630feffa0e863e82f79ca/testing/talos/talos/tests/devtools/addon/content/tests/webconsole/typing.js#20,50-66

const input = "abcdefghijklmnopqrst";
...
const test = runTest(TEST_NAME);

// Simulate typing in the input.
for (const char of Array.from(input)) {
  const onPopupOpened = jsterm.autocompletePopup.isOpen
    ? null
    : jsterm.autocompletePopup.once("popup-opened");
  const onAutocompleteUpdated = jsterm.once("autocomplete-updated");
  jsterm.insertStringAtCursor(char);
  // We need to trigger autocompletion update to show the popup.
  jsterm.props.autocompleteUpdate();
  await onAutocompleteUpdated;
  await onPopupOpened;
  await waitForTick();
}

test.done();
Flags: needinfo?(nchevobbe)

Emilio, are you ok taking this one?

Component: Graphics → Widget: Win32
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Status: NEW → ASSIGNED

Hmm, so this actually doesn't help that much because we're apparently always hiding and re-showing the autocomplete popup, rather than reusing it. That seems not ideal? Nicolas do you know what the setup here is? It seems avoiding that hide / show pairs would be a big improvement (even before this patch) since it avoids re-initializing all the compositor setup and such.

Flags: needinfo?(nchevobbe)

Since we're using jsterm.insertStringAtCursor(char); we don't see the "key stroke" as being an addition, and we do close the popup for each letter.
I can't really remember if that was on purpose, but this doesn't really match user behavior and we can probably dispatch key events instead (which will reuse the tooltip)

Flags: needinfo?(nchevobbe)

But even when not in the benchmark I see more opening and closing than I'd expect. It seems every time the autocomplete list changes the popup is closed and re-opened, rather than it being reused which is what I'd expect. Is that expected? Should I move this to the DevTools component?

Flags: needinfo?(nchevobbe)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #11)

But even when not in the benchmark I see more opening and closing than I'd expect. It seems every time the autocomplete list changes the popup is closed and re-opened, rather than it being reused which is what I'd expect. Is that expected? Should I move this to the DevTools component?

I didn't looked to deep into this, I stopped when I saw hideTooltip was indeed called on each key stroke in the DAMP test.
We can probably keep this bug here so you can optimize the platform code, and I'll have a dedicated bug for the console autocomplete

Flags: needinfo?(nchevobbe)

See comment 12 for perf numbers. If needed we could use it only if
!regionToClear.IsComplex(), but given this and the kind of regions we
usually deal with, FillRect is probably fine or even better perf wise.

It also avoids the region conversion which is nice.

Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4d01c9ed6915 Track already-clear region of transparent windows. r=win-reviewers,rkraesig https://hg.mozilla.org/integration/autoland/rev/7a2b52f98df7 Use FillRect to clear window. r=win-reviewers,rkraesig https://hg.mozilla.org/integration/autoland/rev/ea196c69d404 apply code formatting via Lando
See Also: → 1949051

Filed bug 1949051 for the devtools side improvements (re. comment 13)

(In reply to Pulsebot from comment #15)

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4d01c9ed6915
Track already-clear region of transparent windows. r=win-reviewers,rkraesig
https://hg.mozilla.org/integration/autoland/rev/7a2b52f98df7
Use FillRect to clear window. r=win-reviewers,rkraesig
https://hg.mozilla.org/integration/autoland/rev/ea196c69d404
apply code formatting via Lando

Perfherder has detected a devtools performance change from push ea196c69d4048949cf14ef54f7d44716c1dddf18.

Improvements:

Ratio Test Platform Options Absolute values (old vs new)
64% damp console.typing windows11-64-shippable-qr e10s fission stylo webrender 1,036.30 -> 378.05
33% damp console.autocomplete windows11-64-shippable-qr e10s fission stylo webrender 553.38 -> 368.79
6% damp console.autocomplete.longInput windows11-64-shippable-qr e10s fission stylo webrender 516.41 -> 486.58

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 44008

For more information on performance sheriffing please see our FAQ.

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

Attachment

General

Created:
Updated:
Size: