On a recent project Jon discovered some performance issues with ArrayCollections in Flex. In this episode we discuss some of the realities of working with large data sets in Flex. For additional details read Jon’s blog about the performance problems with ArrayCollection and check out the associated bug in Flex’s bug db. We’ve also put together two Flex demos that illustrate the performance issues:
- Instancing Array vs ArrayCollection Performance (view source)
- Adding items to Array vs ArrayCollection Performance (view source)
Check out the video and let us know what you think.
[…] and I have posted our latest video, Performance Pitfalls of Flex’s ArrayCollection. It is a follow-up to my recent post on the problems we encourtered with […]
[…] and I have posted Episode 3 of the Drunk on Software video podcast. In this episode we talk about some of the real world […]
Can you provide a link to the bug you posted to Adobe for turning off the updates in the ArrayCollection?
when iterating through a large collection of objects and add them to an arraycollection using “addItem” lots of events will be fired off to update the UI. I think James suggested Flex somehow combine all that into one event at the end to update the UI. Have you ever tried something like:
var data:Array = [<lots of and lots of items in this array];
// myAC – an array collection bound to a DataGrid
for each ( var tmp:MyObject in data ) {
myAC.source.push( tmp );
}
myAC.refresh();
Basically that adds the items to the Array being wrapped by the ArrayCollection “myAC” in this case, then at the end the call to “refresh” fires one big update.
Here is the link: http://bugs.adobe.com/jira/browse/SDK-17916
Interesting conversation, tried and succeed that Array being wrapped by the ArrayCollection “myAC” in this case, then at the end the call to “refresh” fires one big update. Thanks.
[…] Watch this episode on DrunkonSoftware.com […]
I’m ashamed to say I just found out about DrunkOnSoftware today. I must say, well done guys.
It’s fantastic to have relevant – and objective – content for RIA devs. So much of what I see these days is either vested in MS or Adobe.
This is one podcast well worth watching.
Wow. Thanks Justin! We try to keep it real – even though I do work for Adobe. :)
-James
Tried :) good result.
var data:Array = [<lots of and lots of items in this array];
// myAC – an array collection bound to a DataGrid
for each ( var tmp:MyObject in data ) {
myAC.source.push( tmp );
}
myAC.refresh();