Bug 263096
| Summary: | Add a ProcessAssertion cache | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> |
| Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | kkinnunen, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Chris Dumez
Add a ProcessAssertion cache to avoid hammering RunningBoard when switching quickly from one assertion type to another (e.g. background <-> foreground).
Taking RunningBoard assertions is expensive and this churn can result in high CPU usage.
We have evidence this can happen for example when we're holding a background assertion on the WebProcess but the client app keeps running JS in the view, causing us to take a foreground assertion for each JS execution request.
We now keep previous assertions around for 3 seconds when switching from one assertion type to another and we reuse them when possible.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Chris Dumez
<rdar://113579564>
Chris Dumez
Pull request: https://github.com/WebKit/WebKit/pull/19027
EWS
Committed 269319@main (f6fade6a9e36): <https://commits.webkit.org/269319@main>
Reviewed commits have been landed. Closing PR #19027 and removing active labels.