I’m an Instruments noob - but gave it a go and there’s nothing I can put my finger on in the output that points to a particular problem - although I think that’s down to me not finding it rather than it not being there.
Of course it’s really difficult to measure twice at exactly the same point in the game - so in one case there may be more baddies around, which obviously makes for a poor comparison.
I don’t really have much advice I’m afraid. I’ve just used Time Profiler on my game in development and pretty much the only method I could see in the call stack that was mine was main and everything else was the system.
It’s a bit of an art, but I was hoping you’d be able to see some comparison between the two.
Well, bearing in mind the only thing being changed is the version of cocos, it should be a system function that is making the change!
Main will encompass all of your methods - so if the game is performing worse, then the performance will be reflected in main, surely?
What I need to find is which of the cocos functions has changed to slow down the overall performance?
Create a new project for 3.6 and one for 3.7
Just change the HelloWorldCScene.cpp to create 100 sprites instead of one
for (int i = 0;i<100;i++)
{
auto sprite = Sprite::create("HelloWorld.png");
// position the sprite on the center of the screen
sprite->setPosition(Vec2(i, visibleSize.height/2 + origin.y));
// add the sprite as a child to this layer
this->addChild(sprite, 0);
}
ON an iPad 1
Running with 3.6 gives GL Verts 672, GL Calls 3, Fps about 17.5
Running with 3.7 gives GL Verts 672, GL Calls 3, FPS about 11 - 13
Interestingly the 3.7 seems to flick between 11.8 and 12.8
At 50 sprites,
3.7 gives 26 fps
3.6 gives 36 fps
So drawing a sprite seems to be considerably less efficient in 3.7!
Could anyone comment on this (i.e. do you get the same results?)
Tried on iPhone 4 too with 50 sprites
3.6 gives 37 fps
3.7 gves 38 fps
So almost identical with 3.7 being more efficient if anything!
Yeah - my tests were with the straight-out-of-git code - so I am hoping there’s stuff in there that just hasn’t been tested yet - I will maybe try with RC0 if I get a chance!
What happens on iPhone 4 with more sprites (like 100 or 200)?
Because in all other situations it looks like 3.7 is a huge performance hit, bad enough for me to refrain from upgrading to 3.7 until this has been resolved…
I am using 3.7rc0 with a side scrolling racing game with chipmunk physics set to update with 3 substeps, a 1024x1024 sprite sheet for a background parallax, and a 1024x1024 sprite sheet with about 20 sprites for the character and world objects, and I have not seen any drop much below 60 fps on Nexus 7, Nexus 9, Galaxy S5, iPhone 5, iPad Mini Retina.
Cocos2d-x render pipeline is getting slower and slower, and this due to the 3d features, and yeah, disable Sprite Clipping this well give your benchmarks a little boost… Look in a header file named “ccConfig.h”…
Me neither, i’ve switched my project to 3.7rc0 and haven’t seen any degradation in performance. My game is quite big, with 3d objects and scenes, custom meshes, heavy use of shaders, particles, physics and a lot of sprites. On iOS devices (4s+ and iPad2+) FPS is 60 and on low end Android devices is around 50-60 (mid and high are always at 60).