Does anybody know why passing a result back to actionscript from javascript via
ExternalInterface can take a really long
time? I'm passing back about 350 KB of data from the return call in javascript
and it takes about 8 seconds before the data
is available in Flex.
My environment is Flex 2, AS 3, and IE 7.
Here's the action script code:
trace("Start: ", new Date());
var data:Array = ExternalInterface.call("getData");
trace("End: ", new Date()); // this will be about 8 secs after "Start"
Here's the javascript code:
var ret = loadData(); // ret will be a multi dimensional array of strings,
about 350 KB total
document.getElementById('timestamp').innerText = new Date(); // "timestamp"
will be less than one second after "Start"
return ret;
It seems to me the performance should be much better. Any thoughts on
improving the performance? Why would it take
so long?