Chrome-based apps lag with multiple windows open, while one window is in the background

For example watching youtube in a new chrome window in the background makes the other chrome window become unresponsive every few seconds. Same thing with steam while the friends/chat window is open in the background and only lags when the chrome parts are open(store, community) the library view works okay while chat is open in the background.

I’m using gnome wayland, maybe that’s the culprit…

ryzen 5700g with the integrated graphics, no dedicated card in the system.

I think the reason are the socalled webworkers - worker threads defined by the webapp to send and receive in the background.

The reason such workers exist is keep the webapp responsive while using another thread(s) to send and receive.

There is not much you can do about it but ensure your browsers cache is on a tmpfs.

One example is

Shouldn’t this be an issue in other cases. For example if I use youtube in a tab in the same window I have no problems. No problems when the two windows are visible in split screen mode.

Also I have 16 threads and an nvme, is really the cache is the cause not some rendering shenanigan?