Comment by deaddodo
12 hours ago
It's the js that does it, because so many webpages are terribly optimized to integrate aggressive ad waterfalls into them. Or have persistent SPA framework's doing continually scope checks.
That being said, there's no reason the Safari context shouldn't be able to suspend the JS and simply resume when the context is brought back to the foregrown. It's already sandboxed, just stop scheduling JS execution for that sandbox.
Sorr of related. On my laptop running linux, Firerox with youtube will get progressively slower if you keep sleeping and waking up the laptop. It is as though the JS is struggling to keep up with adjusting to the suspend and wake cycle. This never happened on Windows/macos systems so it could just be a linux thing.