Display <- X server <- Compositor/WM <- X server <- Your app
Where compositor/WM and your app are X clients, i.e. there's lots of context switches between clients and the server.
I personally don't see much wrong with this design BTW, despite the context switches X is pretty smooth even on some pretty wimpy hardware (eg. Raspberry pi, or Nokia N900, or the wimpy Pentiums I ran X on 15 years ago).
Display <- X server <- Compositor/WM <- X server <- Your app
Where compositor/WM and your app are X clients, i.e. there's lots of context switches between clients and the server.
I personally don't see much wrong with this design BTW, despite the context switches X is pretty smooth even on some pretty wimpy hardware (eg. Raspberry pi, or Nokia N900, or the wimpy Pentiums I ran X on 15 years ago).