GO and performance (Bug or not?)(SOLVED)

I just tried to create empty project.
It consist:

  • one factory
  • one empty object
  • one script file with the next code:
function init(self)
    for i=1,10000 do

This is absolutely empty project even without sprites.

And I receive next result on iPad4:

@Ragnar_Svensson said that GO is really easy entity, but it looks different

I just want to be sure that this is not a bug of Defold. It looks really strange.


An empty game object is not ignored by the engine. A game object still has a transform and that transform needs to be updated every frame. This still costs CPU cycles. I can’t give you a detailed answer but I know @Mathias_Westerdahl mentioned some optimisations that could be made to improve the numbers.

I will talk to the team about this and try to give this a higher priority since there’s been a lot of recent discussions around Defold’s performance.


For the record, I do call something that takes 8 ms / 10000 = 0.8 microseconds to process a “really easy entity”. :slight_smile: But as @britzl says, the transform processing can be improved so it takes less time.


Cool! Looking forward for this optimizations.

For now game create something about 3000 object. Most of them just GO with one sprite component which stay in one place all the time.
In theory 1600 GOs could be replaced with one tilemap, but tilemap doesn’t support isometric tiles and engine doesn’t support skew for GO.


Now, with 1.2.119 it looks much better: 3-4 times faster!

I think I can mark this issue as resolved.