Every window you run with runSketch has its own animation thread.
To test this out, I had a single window draw 100 ellipses per frame at 60 frames per second, then I had it draw 400 ellipses per frame at about 18 fps.
I then created three extra windows, and tracked their frameRate while each drew 100 ellipses per frame, which came to about 13fps each.
If each window is on a separate thread, should my multi-core processor not be able to handle them separately, allowing 4 windows to draw a total of 400 ellipses per frame at 60fps? Why do 4 windows do a poorer job at handling the same workload as a single window?
You assume that all renderers are working independently, but depending on the OS and underlying libraries for each renderer, there are a variety of actions and resources that can only be accessed one at a time, or require running on one (extra) thread.
Thanks for the reply.
That makes sense I suppose. I wonder if there’s any hope in utilizing multiple threads even in the most limited of ways.
If anyone would like to expand on some of the inner workings nielcsmith brings up, I would love to have a more in depth understanding of how it all works.