Skip navigation
Currently Being Moderated

Optimizing Flex Mobile Applications(not Games)

May 3, 2012 3:10 AM

Tags: #flex #mobile #optimize #actionsctipt3

I have now been developing aplications for Mobile devices using Flex framework for quite a  while and published 3-4 apps to marketplaces. But if we see the performance of the AIR apps as compared to the Native ones, its still not that much smooth.

Any idea how I can optimize the Flex applications? There are resources avaialable for optimizing games but in case of Apps it is something different. The issues are like, buttons are not sometimes that much responsive to touch events, the screen transitions are not that smooth etc.

Also I would like to know how to create Apps using only ActionScript as I guess they might be smoother as compared to the Flex version. But if it is created using AS3 only, how to best manage the screens so that they don't take up too much memory and give native like performance.

 
Replies
  • Currently Being Moderated
    May 3, 2012 6:19 AM   in reply to rjoshicool

    I've been working on Flex mobile applications (not games) for quite some time now as well. I couldn't achieve the performance of a native application of course. But I think the execution is still smooth enough most of the time.

    The universal answer to your question is to use the Profiler in Flash Builder and fix the performance problems you find in your action script code. Make sure that your profiler is set up to show Flash SDK code as well. Because that's where sometimes the problem is. That's the easiest step. And it can be the most efficient one because as I discovered myself the performance of ActionScript code on mobile devices is quite dissappointing. The next step would be optimizing [render] and [pre-render] phases of the execution. You can easily find ton of information on that on the Internet.

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 6:58 AM   in reply to rjoshicool

    You can't achieve native performance in most situations. Doing anything ARM/Flash-centric you will always find spark native components are slower than their native counterparts. Even hand-coding them (e.g. blitting) will get you no more performance, just more lines of code and more headaches.

     

    This should be obvious.

     

    Aside that you need to weigh in that the code base you build for your app can mostly be used to output an app for several other targets (if you speak XCode). AIR for IOS, Android and Blackberry. That's both phones and tablets. Also Desktop Mac OSX and Windows as well as the Web (without AIR).

     

    So if you want native performance, be prepared to build your app from scratch several times. The performance loss of going the Adobe route gives you the flexibility of exporting your app to multiple targets. That justifies the so-called "boggy" performance for me and my multi-billion dollar clients.

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 7:14 AM   in reply to sinious

    That's actually the only reason why my client decided to use AIR to develop for mobile. a) we had a failry big code AS3 base and b) they wanted to target multiple platforms at once. Including Web and potentially native installer on Mac. From the very beginning we expected the performance to be worse than for native applications. But that was the price they agreed to pay.

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 7:35 AM   in reply to Zhenya1919

    So you get what you correctly informed your clients of. Sub-par performance. What's the question then?

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 7:38 AM   in reply to sinious

    Oh, no. I don't have any questions. :-) I just tried to help the topic's starter.

     
    |
    Mark as:
  • Currently Being Moderated
    May 3, 2012 7:47 AM   in reply to Zhenya1919

    OP: AIR for iOS will be a bit boggier than native, outside the components that are invoked via AIR that are native, like StageVideo and StageWebView, etc.....

     
    |
    Mark as:
  • Currently Being Moderated
    May 4, 2012 6:29 AM   in reply to rjoshicool

    The original post said there's updaes for games but (spark) components don't feel native.

     

    Then realize the GPU is about 25 gigaflops faster per second and utilize it.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points