Skip to main content
June 23, 2010
Question

Flex 4 considerably slower than Flex 3

  • June 23, 2010
  • 1 reply
  • 2093 views

We are working on a client-server based visualization system. Our client is  written in flex and comprises two main views: A design view that shows a  flow diagram where users define modules and module relations, and a  semantic view that shows the visualization views.

The  client was originally written in Flex 3, naturally we want to use Flex 4  right now. However,  when switching to Flex 4, throughout the  application we experience major performance losses. To quantify this we  have picked a representative client action: The switching from the  semantic view to the design view (only one is visible at a time, see my  short video:
http://old.vrvis.at/download/hiaMoh4M/flex4issues.mp4 ).
We use a fade effect for the transition between these two states,  however, the fade effect starts very delayed if we go for Flex 4  without the Flex 3 compatibility mode.


We did timings for 4 cases:

1.  Flex 4 with Flex 3 compatibility mode: 828 ms, this is ok

2.  Flex 4 without Flex 3 compatibility mode, using the old mx  components: 3759 ms  => this is a real problem, 3 times slower, why  is this?

3. Flex 4
without Flex 3 compatibility mode, replacing most of the mx containers (boxes) with the  Flex 4 related versions (groups) , Halo theme => 3500ms, no  improvement

4. Flex 4
without Flex 3 compatibility mode, like before,  replacing most of the mx containers (boxes) with the Flex 4 related  versions (groups) , but the Spark theme => 8460ms, what's going on  here?


Here are the details about our test  system:


Prozessor: AMD Athlon 64 X2 Dual  Core 4400+ 2.21 GHz

RAM: 4.00 GB

Windows XP x64 Service Pack 2

Using Adobe Air 2.0.


I know that we are  extensively using nested boxes for our layout (this is very convenient),  but why is Flex 4 performing so much worse than Flex 3? Is there  something we could be doing completely wrong?

Thanks much for  your help,
Jurgen

This topic has been closed for replies.

1 reply

JabbyPandaUA
Inspiring
June 28, 2010

I would cut the application from the normal configuration to the minimal possible configuration to track the offending resource intensive part of it.

Participant
March 10, 2011

I have run a full comparison of Flex 4 vs Flex 3.  Flex 4 is 163% slower than Flex 3.  Here's the link to my post on the matter: http://jackviers.blogspot.com/2011/03/flex-3-vs-flex-4a-performance.html

The summary of the article:

A week ago, a friend and respected colleague of mine, Paul Smith IV, mentioned in passing that Flex 4 was slower than Flex 3. He had no quantitative data to back up the claim and a quick perusal of Google didn't reveal anything either. About to embark on a large migration of a Flex 3 codebase at work, I decided that a performance comparison was in order. My findings show that the average Flex 4 component  is 163.41% slower, or 531.77 ms slower, than its direct Flex 3 counterpart, and that difference in component performance increases application startup time linearly in statically defined applications and also applies generally logarithmically as components are dynamically added to the application view. Though Flex 4 applications perform slower, they produce .swf files 82.26% smaller than Flex 3 applications. On a 512 kbps line with 10% overhead, this results in 88.89% faster download times with Flex 4 vs. Flex 3. If the average human speed of perception is 16ms, the perceived performance gain using Flex 4 is 87.97% over Flex 3. Because this perceived performance only applies to initial load, the questions arise: Should Flex 4 be used in large, dynamically downloaded applications? Do the benefits of code reuse by developers, easier view management, and separation of concerns inherent in Flex 4's spark component architecture outweigh the performance degradation at runtime as compared to Flex 3?

Are there any plans to fix this? Should I enter a bug in JIRA for it?