Threading is one of the major missing features in Flex/Flash Player.
Basically, the player is multi-threaded and some operations will happen
asynchronously but ActionScript code always executes on the same thread.
For example, when you make a HTTPService call the network code itself will
run on a separate thread, but your call and the event handler for the
callback run on the same thread.  If you do a lot of processing that takes
more than a frame then the frame rate will decrease and perceived
performance will suffer.  To combat this use the built-in functionality
which is multithreaded as much as possible and when appropriate offload
processing work to the server.
 
When you have to do heavy processing on the client one solution is to break
up the work into separate chunks and then use a frame-based loop to process
the chunks until it's done.  One problem is it's hard to know how much
processing to do in each frame because there's no way to know how much time
has already elapsed in the current frame before your code started or how
much other work is going to be done before the frame is complete.  
 
HTH,
 
Sam
 
-------------------------------------------
We're Hiring! Seeking a passionate developer to join our team building Flex
based products. Position is in the Washington D.C. metro area. If interested
contact [EMAIL PROTECTED]
  
 


  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of ravi kumar gummadi
Sent: Thursday, February 22, 2007 1:07 PM
To: [email protected]
Subject: [flexcoders] Java to Flex shifting ! Major Hurdles!!! (Shud I say
Roadblocks! )



Hi,

I am basically a Java guy, recently into Flex. It may be due to the sudden
paradigm shift from serial programming ( incl Threads) to Event Based
Programming, that I find many features totally new and surprising. 

Reply via email to