I have a GUI application that I want to test in parallel by running my tests in different X-servers. To do that I start the application using Xephyr or Xvnc, then I start the script to do the testing, and it works.
The problem I am having is that the GUI application's CPU consumption is very high, when I run it inside Xephyr/Xvnc, such that I can't run more than one test in parallel, because of CPU limitations.
When I run the gui application and check CPU usage with htop, it shows CPU% around 10 to 50%. When I run the same application with Xephyr or Xvnc, it shows CPU% around 200 to 250% (out of 4 CPUS).
Xephyr/Xvnc itself does not seem to add much overhead, but the GUI application, when run inside a Xephyr/Xvnc server seems to consume 5x more CPU than normal. Is there a reason/solution for that?