Performance imrovement

Performance imrovement
0.0 0


How can I improve performance of the game that was written with the help of html5 version of cocos2dx framework?
Is there any advices, tips or tricks?


Closure compiler advanced mode - this can speed up 10-20

don’t write deep chain of inherited class, calling super methods are expensive

reuse your objects, don’t create new instance too often, not only creation is slow, Garbage Collection is slow too

some calculation don’t need to be run every frame, you can use cc.Schedule to time it, (for example, AI logic is good enough when run 4 times a second)

These are just general tip

what is the type of your game? and what platform are you targeting?


This is a casual game, but includes a big amount of graphic resources.
Target platforms are iOs browser(iPhone, iPad) and PC browser.