However I've had a lot of issues with WindowServer. I have an external 4k display connected to my mac (Macbook Pro 2021 14"), which I usually scale down to 3200x1800 HiDPI. And 2-3 days after a fresh boot, I'll start to have issues such as the WindowServer process jumping to around 140-180% CPU, and staying there until I reboot (or restart the process). I'll also randomly have my cursor start "glitching" and jump around in a 20px radius around the place I want to point; but only on my external screen.
My feeling is that it has something to do with the non-integer scaling I'm doing , and WindowServer entering at some point a state which introduces rounding errors (which would explain the glitching cursor) or something like that. Also, switching resolutions (or even refresh rate) of the external display will temporarily fix the cursor glitching issue.
But my biggest complain, by far, is that there is virtually zero way for me to troubleshoot/debug the problem. As far as I can tell, there is no way for a debugger to attach itself to the WindowServer process, no documentation on internal workings of the rendering pipeline, virtually no logs, etc. I've been trying to narrow down those issues for 6-8 months, and I've stilled not been able to track it down