0 Replies Latest reply on Sep 18, 2010 1:27 PM by John Hall

    Can't help but share arraycollection updating vs. source updating

    John Hall Level 4

      I've read and read advice about updating the source array of an arraycollection if one has a lot of updates to perform but I had never run into real-world issues with the speed of what I was doing. However, on my current project, I'm updating a calendar and every time I added a calendar event, Flex was trying to be helpful by dispatching collectionChange event, trying to help me out way too much via binding. That was no problem until I decided to allow for clipboard pasting of selected items and I just couldn't figure out why it would take 10 seconds to paste maybe 100-200 copies of calendar events. When I switched to updating the source array and then refresh the arraycollection at the end of the process, the elapsed time went from an average of 9.14 seconds to 0.18 seconds. So thanks to all those who at least pounded that suggestion into my head so that it bubbled up when I finally encountered a real-world problem and keep it in mind the next time your arrayCollection seems like it's taking to long to update.