RESOLVED FIXED Bug 205069
There should be no user-noticeable delay when closing a tab
https://bugs.webkit.org/show_bug.cgi?id=205069
Summary There should be no user-noticeable delay when closing a tab
Chris Dumez
Reported 2019-12-10 09:57:04 PST
There should be no user-noticeable delay when closing a tab. To achieve this, use a timeout of 50ms for doing the IPC handshake with the WebContent process, instead of 500ms.
Attachments
Patch (1.57 KB, patch)
2019-12-10 10:00 PST, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2019-12-10 09:57:50 PST
Chris Dumez
Comment 2 2019-12-10 10:00:50 PST
Chris Dumez
Comment 3 2019-12-11 08:30:25 PST
ping review?
WebKit Commit Bot
Comment 4 2019-12-11 14:05:28 PST
Comment on attachment 385276 [details] Patch Clearing flags on attachment: 385276 Committed r253395: <https://trac.webkit.org/changeset/253395>
WebKit Commit Bot
Comment 5 2019-12-11 14:05:30 PST
All reviewed patches have been landed. Closing bug.
mitz
Comment 6 2019-12-11 18:36:11 PST
What’s the user-visible symptom when the UI process misses the 50ms deadline? Can you share any field data on how often it would happen?
Chris Dumez
Comment 7 2019-12-11 19:06:26 PST
(In reply to mitz from comment #6) > What’s the user-visible symptom when the UI process misses the 50ms > deadline? Can you share any field data on how often it would happen? It would not be the UIProcess missing the deadline but rather the WebProcess missing the deadline. From the UIProcess point of view, after 50ms we close the tab no matter what, even if the page’s script is still handling the beforeunload event. The idea is that we give the page’s script a chance to tell us if we should display an unload confirm prompt but not at the cost of a delaying the tab closing for more than 50ms. The script has 50ms to tell us to show the prompt or we close the tab without showing such prompts. I do not have data on how common this will happen in practice. However, there is error logging in release builds if it happens. Also, from my own personal experience unload confirm prompt are not very common on the Web.
mitz
Comment 8 2019-12-11 20:55:33 PST
(In reply to Chris Dumez from comment #7) Thanks for the detailed response, Chris! > (In reply to mitz from comment #6) > > What’s the user-visible symptom when the UI process misses the 50ms > > deadline? Can you share any field data on how often it would happen? > > It would not be the UIProcess missing the deadline but rather the WebProcess > missing the deadline. Sorry, my silly mistake. > From the UIProcess point of view, after 50ms we close > the tab no matter what, even if the page’s script is still handling the > beforeunload event. > > The idea is that we give the page’s script a chance to tell us if we should > display an unload confirm prompt but not at the cost of a delaying the tab > closing for more than 50ms. The script has 50ms to tell us to show the > prompt or we close the tab without showing such prompts. Makes sense. > I do not have data on how common this will happen in practice. However, > there is error logging in release builds if it happens. Also, from my own > personal experience unload confirm prompt are not very common on the Web. I also rarely get prompted on close (even with the current 500ms delay).
Note You need to log in before you can comment on or make changes to this bug.