<fx:AnandVardhan/>

lights..camera..Action..Script.. ing..

Flex SWF Optimization

Posted on | June 14, 2010 |

I found this list somewhere and was very much inclined with what I feel, so thought worth posting it here

  1. Keep nesting thin: Don’t nest too many VBoxes and Canvases, that will make your app dramatically lag/freeze
  2. Don’t Embed: Only embed things that are very small and need to show up immediately (icons in skins for example)
  3. Deferred Instantiation: Only add what the user needs to see. Everything else will wait until the user goes there.
  4. Explicitly size all item renderers. If DataGrid item renderers aren’t explicitly sized, your app might freeze for an instance when constructing it.
  5. Optimize Assets for the Web (icons ~< 20k, large images ~< 200k as a rule of thumb).
  6. Refactor to remove excessing curly-bracket Binding (width="{something.other.width/4}"). Causes a bunch of events to be dispatched that you likely don’t need. Too many events == too many temporary objects == lag.

Worth reading links:

http://www.insideria.com/2008/04/flex-ria-performance-considera.html

http://www.insideria.com/2009/04/51-actionscript-30-and-flex-op.html

Comments

Leave a Reply