Bug 237156 - Take down shared worker context connection less aggressively when it becomes idle
Summary: Take down shared worker context connection less aggressively when it becomes ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-02-24 13:33 PST by Chris Dumez
Modified: 2022-02-24 16:55 PST (History)
6 users (show)

See Also:


Attachments
Patch (8.58 KB, patch)
2022-02-24 13:36 PST, Chris Dumez
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2022-02-24 13:33:42 PST
Take down shared worker context connection less aggressively when it becomes idle. Give it 5 seconds before shutting it down in case it ends up being used again in the near future.
This is similar to what we do for service workers.
Comment 1 Chris Dumez 2022-02-24 13:36:02 PST
Created attachment 453135 [details]
Patch
Comment 2 Darin Adler 2022-02-24 16:50:06 PST
Comment on attachment 453135 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=453135&action=review

> Source/WebKit/NetworkProcess/SharedWorker/WebSharedWorkerServerToContextConnection.cpp:146
> +    // Terminate context connection after a little while if it is no longer used by any SharedWorker objects.

If I was doing this change, I’d put this comment on the constant rather than the code that uses it. Not sure that’s better, though.
Comment 3 Chris Dumez 2022-02-24 16:54:11 PST
Committed r290477 (247775@trunk): <https://commits.webkit.org/247775@trunk>
Comment 4 Radar WebKit Bug Importer 2022-02-24 16:55:18 PST
<rdar://problem/89447191>