I did a little research on why my CPU usage shoots through the roof for my simple program, and the answer seems to lie in the way Processing itself is structured. From my understanding, everything runs through the draw loop, which essentially means every screen refresh is calculated, drawn, then wiped.
My guess was that I could limit the CPU usage by either
(a) limiting the frame rate
(b) limiting the screen size
And it turns out I was correct... to a certain extent. (a) would only work if the framerate() limit was lower than the actual framerate, which turned out to be 60fps on my laptop, but 10 fps on my spare desktop, based on Fraps. (b) seemed to work fine, except for the fact that my application requires a full screen. By making my resolution half of was it was before, my fps went from 10 to 30.
I'm trying to figure out a way to draw the program at a smaller resolution (lets say.. 400 by 400) but stretch it so that it covers the full screen so that the CPU usage is suppressed compared to drawing the program at the native resolution. The export to full screen mode doesn't really work as intended. I tried the boolean sketchFullScreen() but that doesn't seem to work either. Are there any ways to go about this?
1