Thank you so much for this! At least now I can see the worst offenders. How did you even find this tool? The internet has almost no records of it. Amazing.
Still does not explain why this balloons over time. Aka if I restart my Mac right now and reopen the same exactly apps with the same exactly windows the WindowServer will take 80% less memory.
No 8GB, compressed or whatever was not enough for MacOS when M1 was released. Even for simple outlook, web browser, excel type of workflows.
After 3-4 hours of work, the window manager process itself is consuming gigabytes of memory. Not even considering any browser or electron apps.
My M1 Mac mini was choking up so much that I had to trade it in. That was back in 2021. Today apps are even more bloated.