Open Bug 1869589 Opened 6 months ago Updated 3 months ago

Pre-XUL Skeleton UI is flickering a bit and _may_ be causing a startup slowdown

Categories

(Firefox :: General, defect, P3)

defect

Tracking

()

Performance Impact medium

People

(Reporter: mconley, Unassigned, NeedInfo)

References

(Depends on 3 open bugs)

Details

(Keywords: perf:startup, reproducible)

Attachments

(1 file)

This was reported by pascal (cc'd).

Effectively, pascal noted that when starting Firefox on his reasonably high-powered machine with the Pre-XUL skeleton enabled, it seemed to start more slowly than if we flipped the pref to show the skeleton off.

The other thing that we noticed while exploring this is that the background of the Pre-XUL skeleton UI flickers for a frame before the UI overtakes it.

I ran multiple startups on my fast Windows machine and the skeleton UI didn't feel great. When the browser window is maximized, the skeleton is not drawn at the right position, so the entire window flickers. When the browser window is smaller, it is drawn at the right place, but it feels like there are a few white frames being painted between the skeleton UI and the actual browser UI (it goes too fast to say exactly what happens without a video recording).

I tried to do screen captures, but somehow they never included the large flicker.

They did show a few smaller issues:

  • The skeleton draws the first tab position as if the "firefox view" button wasn't there, causing flicker in the tab bar.
  • The border radius used for the tab shape is not the same in the skeleton and the actual browser UI.
  • The skeleton UI draws the browser toolbar bottom border as if the bookmarks toolbar was going to be displayed, but then the browser UI is painted without the bookmarks toolbar, and then the bookmarks toolbar is added a few ms later.

Taking a video of the screen with my phone shows the large flicker.
(skip the first 5s, and then from the devtools console document.querySelector("video").playbackRate = 0.1 to have time to see what's happening)
It looks like the opacity of the entire window background is reduced at some point during startup.

The severity field is not set for this bug.
:mossop, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(dtownsend)

S2 if this is actually slowing down startup.

Severity: -- → S2
Flags: needinfo?(dtownsend)

(In reply to Florian Quèze [:florian] from comment #2)

Created attachment 9368246 [details]
firefox-startup-flicker.mp4

Taking a video of the screen with my phone shows the large flicker.
(skip the first 5s, and then from the devtools console document.querySelector("video").playbackRate = 0.1 to have time to see what's happening)
It looks like the opacity of the entire window background is reduced at some point during startup.

Do we think the opacity change is a graphics/win32 widget thing? Can we ping whoever could investigate this more closely?

(In reply to Florian Quèze [:florian] from comment #1)

They did show a few smaller issues:

  • The skeleton draws the first tab position as if the "firefox view" button wasn't there, causing flicker in the tab bar.
  • The border radius used for the tab shape is not the same in the skeleton and the actual browser UI.
  • The skeleton UI draws the browser toolbar bottom border as if the bookmarks toolbar was going to be displayed, but then the browser UI is painted without the bookmarks toolbar, and then the bookmarks toolbar is added a few ms later.

I suspect we should file individual follow-ups for this, unless you think we should rearchitect the skeleton UI code entirely?

Flags: needinfo?(florian)
See Also: → 1868523

Alex might have thoughts on this.

The Performance Impact Calculator has determined this bug's performance impact to be medium. If you'd like to request re-triage, you can reset the Performance Impact flag to "?" or needinfo the triage sheriff.

Platforms: Windows
Impact on browser: Causes noticeable startup delay
[x] Able to reproduce locally

Performance Impact: ? → medium
Flags: needinfo?(dothayer)

Odd. I can't reproduce on my end, at least WRT the opacity issue. I'm wondering if there's something Win11 specific? Can anyone reproduce this on Windows 10?

Flags: needinfo?(dothayer)
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: