I'm hoping someone else has experienced this and subsequently found a solution as I am about to light my own hair on fire in frustration.

Simply put, I was creating a Cocos2D app using XCode 3.2.6 and SDK 4.2. I used two devices for testing: iPhone 3GS and iPhone 4, both at IOS 4.2, I believe. When testing on either device I was getting solid 60 FPS performance.

The disaster first hit when I upgraded to XCode 4.2. With no trouble I was able to open my project directly into this new version and run it. Everything is the same except that I am now in XCode 4.2. To my shock and horror I found that I was now getting FPS in the 45 to 50 range, and it will drop into the 30's at times, none of which ever happened before.

At this point I decided to upgrade to Lion, XCode 4.3, and SDK 5.1. Unfortunately, this changed nothing.

I then upgraded both phones to the latest IOS, and still the performance problem continued.

Finally, I upgraded to the latest version of Cocos2D, but to no avail.

I have tried a number of remedies that involved release versus debug modes, compiler settings, etc. Nothing helps.

I found something that might be a hint, but I do not know enough about Open GL ES at this time for it to make a lot of sense. On another forum someone had complained about the very same problem and said that if they disabled Vertex Buffer Object (VBO) support, it resolved the problem. I found where this is enabled within Cocos2D, disabled it, and to my surprise I was back up to 60 FPS. The app does not perform as strong as it did when compiled under XCode 3.2.6, but it is much better with VBO support disabled under XCode 4.3. The problem with this is that disabling VBO support is not recommended as it is suppose to enhance performance when enabled.

Some of the testing I have done seems to point to graphics being the issue. When the app does drop into the 45 FPS range all I have is 12 to 20 sprites moving on the screen. If I remove these sprites and allow everything else to continue operating, I get back to 60 FPS, even with VBO enabled. When I was developing under XCode 3.2.6, I at times would have 100+ sprites moving along (both in view and out) and the the FPS remained at 60.

So in short (sorry, too late for that), does anyone have any idea how the exact same code would run great when compiled through XCode 3.2.6, but rather badly under XCode 4.3? I have tried many different compiler settings to no avail. My guess is that there is some simple setting somewhere that perhaps defaults to a different value between XCode 3 and XCode 4.

Any help would be appreciated.


  • \$\begingroup\$ Was OpenGL VBO / Display List Performance in Game Environment the hint you found? \$\endgroup\$ – Joshua Drake Apr 27 '12 at 13:11
  • 1
    \$\begingroup\$ And have you seen Upgrade from 4.2.1 to 4.3.3 (and xcode to 4) big performance problem? \$\endgroup\$ – Joshua Drake Apr 27 '12 at 13:13
  • \$\begingroup\$ I read the first link, and what is there is currently beyond by full understanding. I had found the second link a few days after I experienced the performance drop and sent a message to the original author, asking if he had ever found a solution. He responded and stated that he had not. I am convinced this is a settings issue, as this is the exact same code that ran well under XCode 3, but somewhat poorly under XCode 4. I have just run out of settings that I know how to change. If it is not a setting, then it must be something different in the SDK's that accompany the XCode versions. \$\endgroup\$ – Pluvius Apr 27 '12 at 17:57
  • \$\begingroup\$ Also, it was your second link that gave me the hint about disabling VBO. \$\endgroup\$ – Pluvius Apr 27 '12 at 18:04
  • \$\begingroup\$ Any new information on this thread? Is VBO the way to go or should one keep down the number of added sprites? \$\endgroup\$ – Andreas Helgegren Dec 17 '12 at 14:41

Browse other questions tagged or ask your own question.