Or even considered to be rendered
I'm trying to optimise my app and I'm noticing some slowdown, especially when I've been navigating between the different scenes and accessing list views etc.
When I leave a scene I always set the parent Sprite object to be not visible, but it seems that even though the object is invisible the fact that it's still in the hierarchy is having a penalty on render speed.
Is there an easy way to get a count of all the children attached to the stage so I can see where I might need to do some removals?
WhiteTree Games - Home, home on the web, where the bits and bytes they do play!
#MakeABetterGame! "Never give up, Never
NEVER give up!" -
Winston Churchill
Comments
Likes: techdojo
Thanks.
look here
http://www.giderosmobile.com/forum/discussion/318/snippet-count-total-children-of-a-parent#Item_1
www.tntengine.com
(and @GregBUG for the link of course)
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Hmmm ... Time to re-visit the scene manager code and make sure that once a scene is not active it's actually removed from the stage - I already do this if I want to destroy the scene on exit but not if I want to keep it so I can switch back and forth (like on my tab view control)
I'd be interested to see what kind of processing and code is run on a display object (Sprite or child of a sprite) even when it's invisible - are it's children still processed?
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
btw, what is your test device?
Is there a reason why invisible objects still receive touch events?
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Thanks for the help
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
As you know, with ADDED_TO_STAGE/REMOVED_FROM_STAGE events, you also don't need to worry about ENTER_FRAME
Likes: jmrmbz
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975