Within this blog entry I will enlist some of the simple optimizations that one can do within actionscript 3 and particularly iOS mobile applications
1) No modifications to display list within timer events
In case you have a timer event firing at a very high rate and your application is making changes to the display list within this event handler. Consider that the fps of your application is lesser than the rate at which your timer is firing. In such a case you will be making changes to the display list which will never be actually used and you will be making unnecessary calculations within these timer events slowing down the player.
Instead the recommendation in such a case is to use stage.invalidate() call and use the RENDER event. In case you have a very deep display list, do not commit changes directly to the display list instead hold the changes in temporary variable and once you feel that sufficient changes have been made to the display list, then call stage.invalidate(). This will cause a RENDER event to get fired. One should use this event to make changes to the display list from the temporary variables which were holding these changes. Continue reading…