Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flex performance considerations

What are the main key-points a Flex developer should remember in order to improve performance of Flex applications? The ones which come to my mind are:

  1. extending ItemRenderers from more lightweight base classes: i.e. UIComponent
  2. using suspendBackgroundProcessing set to true for animations
  3. using ArrayLists instead of ArrayCollections where appropriate.
  4. useVirtualLayout in Spark DataGroups (unfortunately this step requires Scrollers to make this advice effective)
  5. SQLight performance optimizations for AIR apps (transactions etc)
  6. Probably splitting long data processing into different frames? (Never done this though, so I might be mistaken)

What are the key guidelines you try to follow while developing your Flex3/Flex4/AIR applications in order to increase their performance?

like image 801
Maria Sakharova Avatar asked Mar 04 '11 22:03

Maria Sakharova


3 Answers

It seems to me a lot of people have performance issues w/ itemRenderers. So, my one contribution here to never use binding an itemRenderer. I fix a lot of customer "memory leak" bugs just by rewriting their itemRenderers to use the dataChange event instead of binding.

Beyond that, I second @Wade Mueller's comment about avoiding nested containers as much as possible.

like image 74
JeffryHouser Avatar answered Nov 12 '22 16:11

JeffryHouser


Although this is less important with the lighter weight Spark Groups, I always try to keep the number of nested containers to a minimum and set explicit positions/sizes when possible. Complicated UIs with dynamically sized containers nested within one another cause a ton of (usually unnecessary) measuring to have to occur. This often results in huge lags when switching between views.

like image 32
Wade Mueller Avatar answered Nov 12 '22 17:11

Wade Mueller


My list:

  • use local vars instead of global as much as possible
  • ActionScript instead of MXML as much as possible
  • [Bindable] generates tons of code, try to avoid it

P.S. Автор, а ты русский язык знаешь? :)

like image 6
Tuco Avatar answered Nov 12 '22 18:11

Tuco