Open Bug 1519366 Opened 6 years ago Updated 2 years ago

[meta] Too many restyles when opening new tabs

Categories

(Firefox :: Tabbed Browser, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: florian, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: meta, Whiteboard: [fxperf:meta])

See this profile: https://perfht.ml/2H93fE4

Whenever we have a restyle (light blue markers) that's not followed by a paint, we are wasting time (and causing jank).

Currently it seems each time we open a new tab we restyle 3 times.

The first time is the result of flushing styles by setting the focus in focusAndSelectUrlBar.

The second time seems to be a layout flush (which flushes styles first). I'm not sure we can avoid it, but it would be good to check if we can avoid invalidating styles between the previous style flush and this layout flush.

The third one is when the refresh driver ticks and we paint. We can't avoid this one, especially as the style invalidation is caused by the CSS animations.

Depends on: 1355588, 1371371
Keywords: meta
Summary: Too many restyles when opening new tabs → [meta] Too many restyles when opening new tabs
Whiteboard: [fxperf] → [fxperf:meta]

Is this still relevant?

Flags: needinfo?(florian)

Yes, here is a profile captured today, that still shows the same behavior: https://share.firefox.dev/39DtA86

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