Open jbeich opened 3 years ago
That is very interesting. I think it might have to do with timing or scheduling frames, something Sway has implemented that Cage is still missing...
Right, the lack of frame scheduling adds a lag of 1 frame for each nested instance. I hope a wlroots helper can help with that, and avoid implementing potentially complex logic in cage.
Another useful feature is direct scan-out to avoid any buffer copy. This should already work well for fullscreen GPU buffers, but not yet for shared-memory buffers or scenes with multiple buffers. Since cage inside cage happens to provide a fullscreen GPU buffer to the parent compositor, the cost should be minimal anyways.
I just confirmed that this still happens with the new scene graph. Is there anything Cage needs to do here @emersion or does this need to be fixed in wlroots?
Hm, I missed one thing in the original post: I don't understand why it works better with Sway's default config. max_render_time
isn't enabled, is it? The frame scheduling should be exactly the same in both compositors.
Cage being a kiosk can be used to isolate GUI apps from a parent compositor. For this to scale performance should be close to transparent. However, Cage (unlike Sway) quickly falls below 60 FPS as the chain of compositors grows.
For example, 20 instances of Cage:
versus 20 instances of Sway: