comparison of performance(cocos2d-x 2.2.2 and cocos2d-x 3.0rc)

Excuse me,my English is very poor.
This is my test.My computer information:

this is cocos2d-x 2.2.2,it’s 59~60FPS.
this is cocos2d-x 3.0rc,it’s 30~39FPS.
Why is the cocos2d-x 3.0rc so poor?
If I am wrong, please correct me.Thanks

cocos2d-x 2.2.2 code:
`/////////////////////test cococs2d-x 2.2.2 /////////////////////////////////////////////////////
CCSpriteFrameCache *frameCache = CCSpriteFrameCache::sharedSpriteFrameCache();
frameCache->addSpriteFramesWithFile(“testRes/bz01_1.plist”,“testRes/bz01_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz02_1.plist”,“testRes/bz02_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz03_1.plist”,“testRes/bz03_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz04_1.plist”,“testRes/bz04_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz05_1.plist”,“testRes/bz05_1.png”);

CCDirector *director = CCDirector::sharedDirector();
float w = director->getWinSize().width;
float h = director->getWinSize().height;
for (int i = 1; i < 6; i++)
{
	//Vector<SpriteFrame*> list(7);
	CCArray *list = CCArray::createWithCapacity(7);
	char str[30] ={0};
	for (int j = 0; j < 7; j++)
	{
		sprintf(str,"bz%02d_1_attack_1%04d.png",i,j);
		auto frame = frameCache->spriteFrameByName(str);
		list->addObject(frame);
	}

	for (int n = 0; n < 250; n++)
	{
		CCSprite *sprite_1 = CCSprite::create();
		this->addChild(sprite_1, n);
		CCAnimation *animation = CCAnimation::createWithSpriteFrames(list, 0.1f);
		sprite_1->runAction(CCRepeatForever::create(CCAnimate::create(animation)));
		sprite_1->setPosition(CCPoint(CCRANDOM_0_1() * (w - 50) + 20, CCRANDOM_0_1() * (h - 50) + 20));
	}
}`

cocos2d-x 3.0rc code:
`///////////////////////////test cocos2d-x 3.0rc//////////////////////////////////////
auto frameCache = SpriteFrameCache::getInstance();
frameCache->addSpriteFramesWithFile(“testRes/bz01_1.plist”,“testRes/bz01_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz02_1.plist”,“testRes/bz02_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz03_1.plist”,“testRes/bz03_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz04_1.plist”,“testRes/bz04_1.png”);
frameCache->addSpriteFramesWithFile(“testRes/bz05_1.plist”,“testRes/bz05_1.png”);

auto director = Director::getInstance();
auto w = director->getWinSize().width;
auto h = director->getWinSize().height;
for (int i = 1; i < 6; i++)
{
	Vector<SpriteFrame*> list(7);
	char str[30] = {0};
	for (int j = 0; j < 7; j++)
	{
		sprintf(str, "bz%02d_1_attack_1%04d.png", i, j);
		auto frame = frameCache->getSpriteFrameByName(str);
		list.pushBack(frame);
	}

	for (int n = 0; n < 250; n++)
	{
		auto sprite_1 = Sprite::create();
		this->addChild(sprite_1, n);
		auto * animation = Animation::createWithSpriteFrames(list, 0.1f);
		sprite_1->runAction(RepeatForever::create(Animate::create(animation)));
		sprite_1->setPosition(CCRANDOM_0_1() * (w - 50) + 20, CCRANDOM_0_1() * (h - 50) + 20);
	}
}`


2.2.2test.jpg (10.1 KB)


3.0rctest.jpg (11.6 KB)


system.jpg (34.3 KB)

Could you please paste the whole sample?

@zhangxm
the whole code??

Yep.
Or you can push it to github, then give me a link.
Thanks.

@zhangxm
Can you give me your email?
I think it is more convenient to communicate in Chinese.
Thanks

xiaoming.zhang@cocos2d-x.org

Hi all,
I have tested the performance by using the demo uploaded by @panni1843.
The following attachments are the result:

2.2.2-itouch4:
2.2.2-itouch4

3.0rc1-itouch4
3.0rc1-itouch4

2.2.2-ipad3
2.2.2-ipad3

3.0rc1-ipad3
3.0rc1-ipad3

2.2.2-android-meizu-mx2
2.2.2-android-meizu-mx2

3.0rc1-android-meizu-mx2
3.0rc1-android-meizu-mx2

I’v got the same problem. Can I get this test to try it by myself?
Now I have 53-54 fps on device with empty screen (or 3-6 small buttons and labels).

Screenshoot between 2.2.2-android-meizu-mx2 and 3.0rc1-android-meizu-mx2 are looking different. Are there really the same Bitmaps? The same source used?