I’m working on a menu screen which happens to have 3 CCMenus with ~30 CCMenuItems in each. It’s a sliding menu so each, I suppose, ‘view’ has a single CCMenu that the user sees at a time. In any case, I have a lot of menu items. I noticed that when I load the scene (which only has the menu items) it takes about 8 seconds to load, which is way too slow. Naturally if I get rid of the other two menus (and ~60 items) then it takes maybe a second.
I was wondering if anyone has any tips for dealing with this or if this is a CCMenu only thing or a Cocos2dx kind of thing (with the number of items and all)? Or maybe if anyone has any tips for performance? I’m using the BB simulator and an Android Simulator, but on my BB tablet it’s about 8 seconds slow as well.
Something I like to do is call ->setVisible(false) selectively on the things that aren’t being shown on the screen (write some logic), to reduce the draw calls.
I don’t have experience with either of those emulators but it’s possible the performance of the emulators is just poor (i’ve heard android emulation sucks). So i’d test on a real device if that’s an option for you.
Something I like to do is call ->setVisible(false) selectively on the things that aren’t being shown on the screen (write some logic), to reduce the draw calls.
I don’t have experience with either of those emulators but it’s possible the performance of the emulators is just poor (i’ve heard android emulation sucks). So i’d test on a real device if that’s an option for you.
It’s 8 seconds slow on a real device too. I’ll try to hide the menu items that are off screen and turn them on when the menu is selected and get back.
EDIT: So I tried this out and it only speeds it up by a second. I think it’s the number of items being added….