YOUR FEEDBACK
Three RIA Platforms Compared: Adobe Flex, Google Web Toolkit, and OpenLaszlo
NN wrote: Yeah you are right GWT is poor man's Flex. After using GWT on two...


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
MXDJ TOP LINKS YOU MUST CLICK ON !


Adobe Flex 2 - Experimenting With Frame Rates
Is increasing Flash Player frame rates better?

Digg This!

From Farata Systems Blog

Flex compiler builds an swf file, with a default frame rate of 24 frames per second, unless another value is specified during the compilation. For example,

mxmlc -default-frame-rate=50 HelloWorld.mxml

This command will build the swf file with the frame rate of fifty frames per second. Display list rendering and the ActionScript execution take turns, hence the frame rate can affect your application performance.

Setting the frame rate to fifty does not mean that each frame will be displayed in exactly 20 milliseconds, as there is some OS/browser overhead. Besides, some browsers may impose restrictions on plugins to lower CPU utilization on the user’s machine.

To see how the compile time setting of the default-frame-rate option affects execution of the program let's write a small application that  performs a simple calculation of the actual frame rate on each enterFrame event.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"
enterFrame="enterFrameHandler()">
  <mx:Script>
    var lastTime:int;
    function enterFrameHandler():void {

     trace(int(1000/(getTimer()-lastTime)));
     lastTime=getTimer();
   }
</mx:Script>

  <mx:Button label="Button"/>
  <mx:TextInput/>
</mx:Application>

I ran this program on a Windows XP laptop with a single 1.8Ghz CPU in the Internet Explorer and FireFox browsers. Tables 1 and 2 show the difference between requested and actual frame rates and how hard the CPU works based on the frame rate settings.

default-frame-rate 10          24               50         100
Actual frame rate 9-10     18-26       35-52     50-110 
CPU utilization    15-17% 15-20% 18-20% 26-28%

Table 1 Frame rates with Internet Explorer 6

default-frame-rate 10         24               50          100
Actual frame rate  9-10     16-22       41-50      70-100
CPU utilization 16-20%    18-20%    22-25%    30-33%

Table 2 Frame rates with FireFox 1.5

While results slightly vary, they are self explanatory - lower frame rates translate into lower CPU utilization. You should experiment with the frame rate in your application to find the right balance between the GUI performance and CPU usage.

Remember,  your users may be running several programs at the same time, and you do not want to put their CPU on its knees just because you’ve enjoyed the super smooth graphics rendering. If you are not creating a movie, keep the frame rate as low as you can.

About Yakov Fain
Yakov Fain is a managing principal of Farata Systems, consulting, training and product company. He has authored several Java books, dozens of technical articles. SYS-CON Books released his latest co-authored book , "Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters" in Spring 2007. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. Yakov teaches Java and Flex 2 part time at New York University. He is an Adobe Certified Flex Instructor and an Editor-in-Chief of Flex Developers Journal.

CFDJ News Desk wrote: This command will build the swf file with the frame rate of fifty frames per second. Display list rendering and the ActionScript execution take turns, hence the frame rate can affect your application performance. Setting the frame rate to fifty does not mean that each frame will be displayed in exactly 20 milliseconds, as there is some OS/browser overhead. Besides, some browsers may impose restrictions on plugins to lower CPU utilization on the user?s machine.
read & respond »
JDJ News Desk wrote: This command will build the swf file with the frame rate of fifty frames per second. Display list rendering and the ActionScript execution take turns, hence the frame rate can affect your application performance. Setting the frame rate to fifty does not mean that each frame will be displayed in exactly 20 milliseconds, as there is some OS/browser overhead. Besides, some browsers may impose restrictions on plugins to lower CPU utilization on the user?s machine.
read & respond »
LATEST FLEX STORIES & POSTS
A Runtime Integration Approach to Application Development
This pattern is a hybrid of plug-in and event driven architecture to integrate individual plug-ins together with one another to come up with Plug-in Integrator pattern. This pattern leverages the benefits of both these well-known architectures to provide a optimal solution to build ent
AJAX World - Sun Talks Up its Late-to-the-Party AIR-Silverlight Rival
At Java One this week Sun has been selling its year -old-but-still-upcoming - and definitely late-to-the-party - Adobe AIR- and Microsoft Silverlight-competitive JavaFX Rich Client environment as a potential revenue-generator capable of putting ads on mobile applications and JavaFX Scri
AJAX World - Xceed Launches Microsoft Silverlight 2 Control
Xceed launched Xceed Upload for Silverlight, the commercial offering in support of Microsoft's promising new Silverlight technology. The product is available now for purchase or as a fully functional 45-day trial on Xceed's website. Xceed Upload for Silverlight lets developers add uplo
Microsoft To Keynote 4th International Virtualization Conference & Expo
Mike Neil is general manager for virtualization strategy in the Windows Server Division at Microsoft. Mike is focused on the delivery of the Windows virtualization technology, including Windows Server 2008 Hyper-V, Microsoft Hyper-V Server and Virtual PC 2007. Mike also directs the tec
AJAX World - Skyway Software Announces RIA Developer Contest
According to Sean Walsh, President and CEO of Skyway Software, 'Our Skyway Community is thriving and our members are very talented. We truly look forward to their RIAs submittals and Skyway Builder extensions and are excited that all of the contributions will benefit the entire Skyway
"Virtualization Journal" Debuts This Week at JavaOne
Founded in 2006, SYS-CON Media's 'Virtualization Journal' is the world's first magazine devoted exclusively to what Gartner has earmarked as the single highest-impact IT trend through 2012: virtualization. And now it will be available on newsstands worldwide, as SYS-CON Media seeks to
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE