On a Quad-core AMD, Win7, Java 1.6.0_25, Processing 1.5, such sketch uses around 10 % of CPU. I profiled with JVisualVM:
Unsurprisingly, it appears that most of the time is spent in the paint() section of PApplet, and PGraphicsJava2D's endDraw() -- both draw an offscreen image to the window (the gray background). Maybe there is a redundancy there (I see in the comments that 0194 added synchronization to avoid flickering, it can also be a cause of slow down, potentially -- to confirm).
Interesting too, I see that some time is spent in RegistredMethods.handle(). Looking at the code, I see a new empty array of Objects is created on each call, probably on each frame. I think it would be more efficient here to allocate statically the array and reuse it, instead of creating garbage (Processing avoids, in general, creating itself new objects as much as possible). Obviously it won't speed up much sketches, but it can't hurt, and everything helps... (and it is a reasonable, not obscure, optimization).
getting high cpu load with processing 1.5 on osx 10.6 as well when using the default renderer. 800x600 takes up >90% on my macbook pro (dualcore), setting the framerate to 30 reduces it to ~50%. but for me this heavy cpu load has been happening for quite a while, i blame the os and the java implementation, on win java runs much more economical. if it helps, switch to the opengl render, drops the cpu load to ~5%.
Yep, in addition to framerate, changing window size also greatly influences the load. Which would imply that if it were to blame on these pixie objects PhiLo spotted, their number seems to correlate to the window area
My 4 year old Macbook and I feel belittled by PhiLo's awesome (computational) power btw :'(
I have been forced to work using the OPENGL renderer for any Processing work for over a month now, and don't see this issue getting fixed in the prerelease versions. Isn't this major? Or am I missing something?