I’m new to Cocos. Our team is looking for a new home after what happened to Unity. We’re trying out Cocos Creator and liking it.
Over at Godot reddit, someone posted a detailed break-down of why Godot’s engine bindings will result in some bad performance. I can’t post the link, but you can search for “godot is not the new unity the anatomy of a godot api call”
I’m a technical designer / application engineer, so I don’t like to work in engine code, but I also care a lot about performance.
How does Typescript interact with the cocos engine?
Is it JIT?
Will we run into similar performance bottlenecks outlined in the article while using Cocos Creator on Android / iOS?
Could you send the article link as well so we can look further?
So you can see the main binding invocation happens when components needs to initialize data in renderer and assets loading. They are all low frequency calls during loading and initialization of Renderer components. As for high frequency Node transform modification, we have shared memory design between JS Node and C++ Node, so all modifications happen in JS with JIT, while it also sets a dirty flag to the shared memory chunk. In the C++ main loop execution, we will check the dirty flag to update Node transform in C++ directly, so no direct binding calls involved.
These know-how has been cumulated during the last ten years, and we will continue to improve the engine performance in all aspects.