Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-27127

Improve the handling of large chunks of data in ListCollectionView by only dispatching one event when several items are added

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK Previous
    • None
    • Collections
    • None
    • Language Found: English

    Description

      When an item is added to a ListCollectionView, a CollectionChange event is dispatched. If you add 10.000 items, 10.000 events are dispatched. This can lead into performance problems especially in applications that update large chunks of data periodically (ex.: trading).
      Of course, we could replace the source array of the ListCollectionView, but this doesn't work in the above cases: we want to keep the original data, and add new items.

      The disabledAutoUpdate() and enableAutoUpdate() could be good candidates to overcome the above problems, first calling the disableAutoUpdate, then adding all the records, and at the end calling enableAutoUpdate. The problem is that when we call enableAutoUpdate, instead of >one< Refresh/Reset event, it's sent as many events as the number of items added (so it doesn't solve the problem). It's hard to implement ListCollectionView in a way where it can predict whether it's better to send one event per item, or one event per chunk, but at least it could offer tools to the developer to help him make that decision - for example, adding an optional argument in the enableAutoUpdate that would indicate whether ListCollectionView should send an event for each pendingUpdate, or a single REFRESH event.

      Attachments

        Activity

          People

            adobejira Adobe JIRA
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: