I'd say 10,000 objects is a lot to process in a single result, I'm of
the opinion that this kind of thing should be paginated and processed
in a queue, then Flash won't choke on it.  It will take multiple
requests but then you give the user the opportunity to know what is
going on and cancel it if they want.  Remember if a script takes too
long, like more than a few milliseconds, then the interface won't be
updating.  When you get into the seconds time frame then the app will
become unresponsive, and the browser might start throttling the plugin.


--- In [email protected], "Karl Johnson" <[EMAIL PROTECTED]>
wrote:
>
> Hey Matt-
>  
> I would never even try 10,000 objects in a strongly typed result set
because of the performance. But I think the bigger key factor here is
how deeply nested your strongly typed objects are. In the example I
gave in my reply, it was a very complex nested object...and I gotta
think the actual delay is the deserialization and creation of the
strongly typed objects in memory by the player instead of rendering
time or something else.
>  
> I think what you suggest below is correct.
>  
> Karl
> Cynergy
> 
> ________________________________
> 
> From: [email protected] on behalf of Matt Chotin
> Sent: Tue 2/27/2007 3:59 PM
> To: [email protected]
> Subject: RE: [flexcoders] Re: Flex choking while converting less
than 2 MB of data
> 
> 
> 
> 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: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of ben.clinkinbeard
> Sent: Tuesday, February 27, 2007 1:50 PM
> To: [email protected]
> 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 [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Karl Johnson" <karl.johnson@>
> 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: [email protected]
<mailto:flexcoders%40yahoogroups.com>  on behalf of ben.clinkinbeard
> > Sent: Tue 2/27/2007 1:42 PM
> > To: [email protected] <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
> >
>


Reply via email to