Closed Bug 1358382 Opened 7 years ago Closed 7 years ago

1.22ms uninterruptible reflow at onxblpopupshowing@chrome://browser/content/search/search.xml:1087:1

Categories

(Firefox :: Search, defect, P1)

defect

Tracking

()

VERIFIED FIXED
Firefox 55
Iteration:
55.4 - May 1
Performance Impact ?
Tracking Status
firefox55 --- verified
firefox56 --- verified
firefox57 --- verified

People

(Reporter: rjward0, Assigned: florian)

References

(Blocks 1 open bug)

Details

(Whiteboard: [ohnoreflow][photon-performance][qa-commented])

Attachments

(1 file)

Here's the stack:

onxblpopupshowing@chrome://browser/content/search/search.xml:1087:1
openPopup@chrome://global/content/bindings/popup.xml:53:15
openPopup@chrome://browser/content/search/search.xml:741:13
set_popupOpen@chrome://global/content/bindings/autocomplete.xml:103:10
onResultsReady@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsSearchSuggestions.js:104:7
onResultsReturned@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsSearchSuggestions.js:78:5
_init/this._suggestionController<@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsSearchSuggestions.js:27:72
_dedupeAndReturnResults@resource://gre/modules/SearchSuggestionController.jsm:367:7
process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:707:7
onSearchResult@resource://gre/modules/SearchSuggestionController.jsm:205:13
processEntry@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsFormAutoComplete.js:434:21
getAutoCompleteValues/<@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsFormAutoComplete.js:503:13
receiveMessage@jar:file:///C:/Program%20Files/Nightly/omni.ja!/components/nsFormAutoComplete.js:147:9
Component: Untriaged → Search
Flags: qe-verify?
Priority: -- → P2
Attached patch PatchSplinter Review
The sync reflows here are due to the getComputedStyle calls at http://searchfox.org/mozilla-central/rev/7aa21f3b531ddee90a353215bd86e97d6974e25b/browser/components/search/content/search.xml#1084 and on the next line.

I think we can compute the searchbar panel size and position using getBoundsWithoutFlushing on both the textbox and its input field. This lets us remove the platform-specific hardcoded CSS values that I never liked.

Also, I think no longer requiring a sync layout flush makes this code fast enough that we can probably run it each time the panel is shown without the need for the _computedMinWidth variable, so the attached patch also fixes bug 1358455.
Attachment #8860380 - Flags: review?(adw)
Assignee: nobody → florian
Status: NEW → ASSIGNED
Iteration: --- → 55.4 - May 1
Priority: P2 → P1
Comment on attachment 8860380 [details] [diff] [review]
Patch

Review of attachment 8860380 [details] [diff] [review]:
-----------------------------------------------------------------

Nice.
Attachment #8860380 - Flags: review?(adw) → review+
Pushed by florian@queze.net:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1db9bb48b28
Compute the searchbar panel size and position without sync reflow, r=adw.
https://hg.mozilla.org/mozilla-central/rev/c1db9bb48b28
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
This bug could do with some QA to verify that the searchbar panel is still sized and positioned correctly on all platforms.
Flags: qe-verify? → qe-verify+
QA Contact: adrian.florinescu
Depends on: 1361195
No longer blocks: photon-performance-triage
(In reply to Florian Quèze [:florian] [:flo] from comment #5)
> This bug could do with some QA to verify that the searchbar panel is still
> sized and positioned correctly on all platforms.

Please verify that the panel is sized correctly and that its content is laid out correctly after various operations that could change the searchbar size. I wrote this patch on Mac, and we recently did debugging of related issues (bug 1361195, bug 1104325) on Windows HiDPI. I haven't tested myself on Linux, and haven't seen any bug reports about it.
Whiteboard: [ohnoreflow][qf][photon-performance] → [ohnoreflow][qf][photon-performance][qa-commented]
55.0 20170803103124
56.0b1  20170808170225
57.0a1 20170810100255

Focused on regression and exploratory testing on Windows10/Linux 16.04:

-customized position for search panel; 
-multi-display resizing;
-multi-display with different resolutions on display1 vs display2;
-drag and drop + resizing up and down;


I've only found bug 1389080, but as it's an bug that is reproducible on Nightly 53 as well, marking this issue as verified.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Performance Impact: --- → ?
Whiteboard: [ohnoreflow][qf][photon-performance][qa-commented] → [ohnoreflow][photon-performance][qa-commented]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: