I guess my use-case is very specific, but the performances of
CocosNode._remove() are really important to me.
Once again, this is very specific, but in one of my batches, there is no
z-ordering of the ~10k sprites (they all are at z=0), so I changed the
_remove() function to this one :
def _remove( self, child ):
self.children.remove((0,child))
if self.is_running:
child.on_exit()
It seems that execution time went from 12.56ms to 0.75ms.
I was wondering if it could be interesting to store somewhere (read-only)
in CocosNode the z-order they were added with, and use it in _remove().
I'm probably the only one interested in removing many Nodes at high speed,
though :D
--
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/cocos-discuss/-/YWb2pjjBhuoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en.