Stop using RunLoopType=_WebKit starting in Big Sur. This was a temporary hack so that our WebProcesses would get the right scheduling priority. Starting with Big Sur, the right way to do this is to use _ProcessType=App and restore the RunLoopType to be NSRunLoop.
<rdar://problem/61742969>
Created attachment 414383 [details] Patch
It looks like r233932 was about app nap / tab nap. With this change, do tabs still nap / suspend properly?
I have a vague memory that we made a sandboxing change that was incompatible with the App process type or the NSRunLoop runloop type. Maybe Per Arne remembers?
(In reply to Geoffrey Garen from comment #4) > I have a vague memory that we made a sandboxing change that was incompatible > with the App process type or the NSRunLoop runloop type. Maybe Per Arne > remembers? I will verify AppNap shortly. I don't foresee any issue.
(In reply to Geoffrey Garen from comment #4) > I have a vague memory that we made a sandboxing change that was incompatible > with the App process type or the NSRunLoop runloop type. Maybe Per Arne > remembers? The sandboxing change made it so that we could not use _NSApplicationMain RunLoopType anymore. We initially tried to use NSRunLoop RunLoopType instead but it broke AppNap. This is when the _WebKit RunLoopType was introduced to unbreak AppNap. I am being told that we can now revert to NSRunLoop RunLoopType as long as we use "App" as _ProcessType (See radar).
Created attachment 414385 [details] Patch
Comment on attachment 414385 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414385&action=review > Source/WebKit/ChangeLog:13 > + After this change, I have verified that the WebContent's main thread still runs at UserInteractive QoS. App Nap is also I have verified that AppNap is still working fine with this patch.
Comment on attachment 414385 [details] Patch r=me OK, I think that addresses all my vague memories :P
Committed r269928: <https://trac.webkit.org/changeset/269928> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414385 [details].
(In reply to Geoffrey Garen from comment #4) > I have a vague memory that we made a sandboxing change that was incompatible > with the App process type or the NSRunLoop runloop type. Maybe Per Arne > remembers? If I recall correctly, we stopped using the NSApplication runloop when blocking the WindowServer. As Chris noted, this introduced a process priority regression, which was fixed by using this custom runloop type. It was possibly also needed to fix the AppNap regression, but Chris seems to have that covered :)