Can you send us a test-case please? Instantiating 10,000 objects like you have shouldn't be so bad as far as I know.
Sounds like getting the XML into anonymous objects is OK, it's just the strongly-typed ones right? Matt ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: Tuesday, February 27, 2007 1:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex choking while converting less than 2 MB of data Wow, that sucks REALLY bad. I appreciate the response Karl. I did try (before posting the original message) setting resultFormat to e4x and then assembling my objects with pretty much the same outcome. Are you suggesting I leave the data as XML permanently? I suppose thats worth a shot but I've found using XML dataProviders to be a real PITA when making extensive use of itemRenderers and labelFunctions (like my app does). Thanks, Ben --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Karl Johnson" <[EMAIL PROTECTED]> wrote: > > 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: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> on behalf of ben.clinkinbeard > Sent: Tue 2/27/2007 1:42 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > 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> <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 >