We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › OSX OpenGL performance boost
Page Index Toggle Pages: 1
OSX OpenGL performance boost (Read 996 times)
OSX OpenGL performance boost
Mar 4th, 2008, 9:03pm
 
Hi all,

I've accidentally come across a bizarre behavior that almost doubles my opengl frame rate under OSX 10.5.2, and I'm wondering if anybody else would care to try to corroborate.

I was looking around in my installed Developer tools just now, and there's an optional preference pane you can install at /Developer/Extras/PreferencePanes/Processor.prefPane . Upon doing so I gained the ability to disable one of my cores by clicking a button. Just to see what happened, I ran a Processing app I have that does a bit of OpenGL-based heavy lifting (mostly rendering triangles). Normally, my frameRate hangs out around 21fps, but to my surprise it jumped to 38fps with one of my cores disabled! The increase doesn't happen  just by turning the core on and off in the prefpane; I have to kill and re-start the applet each time to see the performance boost, but it happens every time. This seems to work for any applet that normally bogs down under OpenGL, but it has no effect on the same applet running as P3D.

For the record, this is on a C2D Macbook Pro (2.16GHz), 2GB RAM, Radeon X1600.
Re: OSX OpenGL performance boost
Reply #1 - Mar 4th, 2008, 9:51pm
 
When I tried this, my framerate dropped in half when the second core was disabled.  As would be expected.  I am using MacBook Pro 2.2 GHZ Intel Core 2 Duo, 2GB, OS 10.5.2.

Here is the stupid test program I used:

Code:

import processing.opengl.*;



void setup(){
size(500,500,OPENGL);
colorMode(RGB,1,1,1,1);
frameRate(60);
}

void draw(){
for(int i=10000;i>0;i--){
beginShape(QUADS);
vertex(-1000,-1000,-i);
vertex(1000,-1000,-i);
vertex(1000,1000,-i);
endShape();

}


}

void keyPressed(){
println(frameRate);

}



Also, I had to download the CHUD tools to get this preference pane, since I didn't already have development tools installed.  You can get CHUD from:

http://developer.apple.com/tools/download/

I wonder if the GUI display for the prefpane somehow got its checkboxes reversed on yours?   Or, your OpenGL usage hits on something special that my very basic program did not.
Re: OSX OpenGL performance boost
Reply #2 - Mar 4th, 2008, 10:22pm
 
Hmm, on your test code I'm seeing 19fps with two cores active, and 35fps with one core active.

Activity Monitor seems to agree with my GUI, though; with one core active the single meter pegs at 100%, and with two it pegs one at 100% and the other hangs out at around 5%.

Bizarre.
Page Index Toggle Pages: 1