I sense there is some issue on the web-mobile on the 1.7.
It seems that the first time anything happens, its very slow, but then the next time performance is increased to normal.
Example, Breaking Gashapon:
(This is a running normal example)
This spawns some bodies and also plays some animations.
On Desktop it goes well since the first run.
Because on mobile on the second time and beyond it runs fine, I think its not a problem with the action itself (like spawning too many bodies).
Is there any tricks to prevent this?
ps. Using the chrome debug tools, I found out that the disk is not being acessed (everything seems loaded properly, even prefab stuff, on the loading screen). So I don’t know what is being loaded.
I can also always run all the objects for given scene before the game starts and call it part of the ‘loading’ phase.
But since it just happens on the very first time I wonder if there’s something I’m missing or a better way to solve the problem.
But its not somethign specific, its also shader application and really any other stuff, although all the stuff seems already loaded in memory. (I mean, all cocos2d.js min, all project.js, and all sprites).
I wonder why would I need to ‘wake’ some stuff, if maybe parts of the code are not loaded for some reason and theres a way of globally loading them more easily.
After taking a deep look at the profiler, i realized that in general, everything is optmized over time.
The more times you execute things, it seems that the cocos2d library creates compiled functions or shorcuts. And its not just the JIT, but a whole bunch of stuff.Actions, sequences, loads, instantiations…
I guess thats really sad for me, I wanted to make a cordova based web game but it seems too unreliable performance-wise :[