-->

Why does this loop kill the performance of a simpl

2019-06-06 15:16发布

问题:

local board=director:createSprite(0,200);

for y = 0, w*15, w do
  for x = 0, w*15, w do
    local space = director:createRectangle({x=x, y=y, w=w-1, h=w-1, strokeWidth=0, color=color.grey})

    board:addChild(space)
  end
end

In addition to the above, I have some tiles which should be able to be dragged smoothly..

I was astonished at the performance degradation by adding these 225 static objects to the scenegraph... I was hoping for better performance than this. Am I missing something? Is there a different approach I should be trying? Or is Marmalade Quick just not that quick?