Open Bug 1426447 Opened 6 years ago Updated 2 years ago

Avoid refresh driver ticks in windows that aren't ready for first paint yet

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Performance Impact low

People

(Reporter: florian, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

While working on bug 1394914, I had to work around overflow events triggered in the navigation toolbar when the browser window had a 1x1px inner size. Looking at this in the profiler showed me that the overflow events occurred while doing interruptible layout flushes caused by the refresh driver.

Previously, I had already noticed in the profiler that we do useless layout work in the main browser window before it is ready, due to the refresh driver. It seems the refresh driver starts ticking as soon as the hidden window has been loaded. This is almost invisible on fast machines, and quite visible on startup profile on very slow hardware.

Bug 1371332 also indicates issues with MozAfterPaint events occurring before a window is ready, causing false talos measurements.

In my flicker tests landed in bug 1421456, I also had to workaround tiny 1x1px paints in new windows: https://searchfox.org/mozilla-central/rev/ff462a7f6b4dd3c3fdc53c9bc0b328f42a5b3d2b/browser/base/content/test/performance/browser_windowopen_flicker.js#79

When I initially mentioned this back in May, smaug did some experiment that he pushed to try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ffc3ef78ac14af3087a78481f1221f58184a3b68 but this didn't go further as we had no prof of a noticeable performance improvement.
There is also bug 1367830 to stop running the refresh driver in the hidden window.
Priority: -- → P1
Priority: P1 → P3
Whiteboard: [qf] → [qf:f64][qf:p3]
Whiteboard: [qf:f64][qf:p3] → [qf:p3:f64]
Whiteboard: [qf:p3:f64] → [qf:p3]
Performance Impact: --- → P3
Whiteboard: [qf:p3]
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: