It is unfortunate, but it is the way it is. When returning large sets of data 
like this, we had to stop using webservices returning objects and change to 
using webservices returning an XML string or HTTPServices returning XML. Having 
the flash player consume a big blog of XML and then you do what you want with 
it (like turn it in to AS XML Objects and use it for a grid's dataprovider, 
etc) is WAY faster than letting flex try to deserialize it all and put it all 
into memory as strongly typed objects.
 
One perf test we did in 1.5 was to return three hundred items as nested, 
strongly typed objects took about 45 seconds for the FP to handle the result 
set and render. When using straight xml, it took about 2 seconds. Of course it 
all depends on how large your result set as well as how deep and nested your 
objects are.
 
Karl
Cynergy
 
Shameless Plug:
Come see us at AJAXWorld next month! Several Cynergy employees, including 
myself, will be presenting on great Flex topics. Don't miss it!

________________________________

From: [email protected] on behalf of ben.clinkinbeard
Sent: Tue 2/27/2007 1:42 PM
To: [email protected]
Subject: [flexcoders] Flex choking while converting less than 2 MB of data



I am calling a web service that sometimes returns up to 1.9 MB of SOAP
formatted data. I have left the resultFormat set to object, and it
seems to handle the initial parsing into anonymous objects without
much trouble. However, when I attempt to convert this structure into
class instances the player chokes and usually ends up freezing the
browser.

The object structure consists of one main Batch object instance, which
contains 2000 BatchDocument instances, which in turn each contain a
single ClientInfo object instance and up to four Plan object
instances. This doesn't seem like a structure that Flex should fail so
miserably with as the performance everywhere else has been pretty
impressive. I have attempted this using Darron Schall's
ObjectTranslator class
(http://www.darronschall.com/weblog/archives/000247.cfm 
<http://www.darronschall.com/weblog/archives/000247.cfm> ) as well as
simply passing the anonymous objects to my class constructors. Both
result in a completely unusable application.

Any help is greatly appreciated.

Ben



 

Reply via email to