Building CPU efficient Adobe AIR apps

One of the biggest complaints we hear a lot about AIR applications is that they use too much memory and/or too much CPU. Sure… Adobe needs to (and will) make investments in improving the performance of AIR and Flash Player but you as a developer can already make some improvements to your app as well. I know this has been discussed before but repetition never hurt anyone. ;-) If you’re having issues with the app that you are building, you should definitely check out Arno’s blog post about this very topic.

With just 4 simple tips, you can dramatically improve the memory/CPU usage footprint of your application.

  1. Use the lowest framerate possible
  2. Dynamically change the framerate to fit your application needs
  3. Only use Event.ENTER_FRAME handlers when necessary
  4. Have as few Event.ENTER_FRAME handlers and Timers as possible

Check out Arno’s blog for more info on how to implement these tips. The AIR team also has a blog post about this topic.

If you have any other tips that you are currently using, please feel free to leave a comment. Also, if you have any questions regarding this topic, please feel free to get in touch.

1 Comment

  1. Grant Skinner has created a class that helps manage frame-rate issues. The issues he mentions are worth the click through into the Adobe bug-base.

    http://www.gskinner.com/blog/archives/2009/05/idle_cpu_usage.html