Open Bug 1388758 Opened 7 years ago Updated 10 months ago

Restoring sessions with multiple windows is very slow

Categories

(Firefox :: Session Restore, defect, P3)

defect

Tracking

()

Performance Impact low
Tracking Status
firefox57 --- wontfix
firefox58 --- wontfix

People

(Reporter: florian, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf, perf:frontend, perf:startup)

See this profile where on a very fast macbook; restoring a session with 15 windows (14 of which contained only 1 tab with about:home) took more than 5s: https://perfht.ml/2wIrz5U

Looking at the JS code doesn't show me obvious problems. There's certainly stuff we could optimize, but it would be small wins.

Looking at the platform stuff however, there seem to be a lot of time spent with the main thread blocked on sync IPC. PLayerTransaction::Msg_GetTextureFactoryIdentifier and PCompositorBridge::Msg_FlushRendering specifically seem to account for a lot of the time.
Please add "perf" key word. Thank you.
Florian, what do you want to do with this bug? Should we move it to Core and ask IPC experts to take a look, or do you want to get a new profile and see where things stand now?
Flags: needinfo?(florian)
Keywords: perf
(In reply to Panos Astithas [:past] (please ni?) from comment #2)
> Florian, what do you want to do with this bug? Should we move it to Core and
> ask IPC experts to take a look, or do you want to get a new profile and see
> where things stand now?

I think the profile here is likely obsolete at this point. Restoring sessions could do with performance improvements, so it may be useful to reprofile someday.
Flags: needinfo?(florian)
Priority: -- → P3
Component: General → Session Restore
Whiteboard: [fxperf]
Whiteboard: [fxperf] → [fxperf:p3]
Severity: normal → S3

A new profile with 12 non-empty windows on a very fast Windows machine shows some significant JS/frontend involvement, but still manages to show the first sign of UI within 1s. It's difficult to disentangle cases where JS e.g. inserts a browser element and that leads to a flurry of core/ipc activity, so I'm not sure that this really shows a big gaping thing we should go and pursue.

I also think that the number of people with large sessions is such that realistically this should probably be low perf impact.

Performance Impact: --- → low
Whiteboard: [fxperf:p3]
You need to log in before you can comment on or make changes to this bug.