Open Bug 1336241 Opened 8 years ago Updated 7 months ago

[meta] Closing a window should be fast

Categories

(Core :: General, defect)

50 Branch
defect

Tracking

()

People

(Reporter: mconley, Unassigned)

References

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

Details

(Keywords: meta, Whiteboard: [photon-performance])

As part of our efforts to improve perceived performance, one of the things that the UX team has identified coming out of the Photon work is that we want the act of closing windows to be very fast. As close to instantaneous as possible. There's some stuff that goes on when we kick off a close of a window: 1) We ask each tab, "do you have an onbeforeunload handler?" since these might prevent the window from opening right away. This involves sending message(s) down to each tab, and waiting for responses to each. We currently wait a max of 5 seconds before giving up and killing the tab. This is probably where we could do a lot better. 2) We do some SessionStore work to (maybe) put the window state into the "restorable window" bucket Finding a better solution to (1) would also make closing tabs faster.
> 1) We ask each tab, "do you have an onbeforeunload handler?" since these might prevent the window from opening right away. This involves sending message(s) down to each tab, and waiting for responses to each. We currently wait a max of 5 seconds before giving up and killing the tab. This is probably where we could do a lot better. Do we have Telemetry for how fast most handlers respond?
Flags: needinfo?(mconley)
(In reply to :Harald Kirschner :digitarald from comment #1) > > 1) We ask each tab, "do you have an onbeforeunload handler?" since these might prevent the window from opening right away. This involves sending message(s) down to each tab, and waiting for responses to each. We currently wait a max of 5 seconds before giving up and killing the tab. This is probably where we could do a lot better. > > Do we have Telemetry for how fast most handlers respond? No. Note that this is mainly a question of "is the main thread in the content process for this tab blocked", because that's really what we're gated on (minus the IPC traffic overhead, which is minimal). Once the message is received by content, it returns an answer right away (which the parent will respond to immediately - if it doesn't, that means the main thread of the parent is blocked and you're sunk anyway).
Flags: needinfo?(mconley)
Depends on: 1334642
I was profiling window closing the other day. We do a bunch of slow stuff, and I filed three bugs for them. There is probably more to file and fix.
Depends on: 1334655, 1334635
Depends on: 1336763
Depends on: 1340842
Priority: -- → P3
Whiteboard: tpi:+
Depends on: 1344302
No longer depends on: 1336763, 1340842
No longer blocks: photon-visual
Whiteboard: tpi:+ → [photon] tpi:+
Component: Widget: Win32 → General
Whiteboard: [photon] tpi:+ → [photon]
Flags: qe-verify-
Keywords: meta
Priority: P3 → --
Summary: Closing a window should be fast → [meta] Closing a window should be fast
Whiteboard: [photon] → [photon-performance]
Whiteboard: [photon-performance] → [photon-performance] [fxperf]
Whiteboard: [photon-performance] [fxperf] → [photon-performance] [fxperf:meta]
Severity: normal → S3
Whiteboard: [photon-performance] [fxperf:meta] → [photon-performance]
You need to log in before you can comment on or make changes to this bug.