Poor handling of VRAM memory pressure when swapping/evicting

If you keep opening up new windows of some program (Chrome for example) until the VRAM is full, desktop performance takes a very hard hit and everything becomes sluggish. This would be expected if I’m switching between windows frequently, but I’d expect the swapping policy to evict background windows to main memory so that I can get smooth performance in the window I’m actively using. That doesn’t happen: if I open a new window and let it settle, performance will still be terrible.

I’ve tried this on Windows and performance is not an issue until I start rapidly switching between windows. Perhaps the Linux side is missing integration with Xorg to know what memory should be swapped? Or does the swapping policy not know about windows and something up the stack like Gnome is constantly accessing all windows’ memory causing incorrect swap behavior? I’m not quite sure where this bug should be filed.