0 Replies Latest reply on Dec 12, 2009 12:42 AM by Evtim Georgiev (Adobe)

    [svn:fx-trunk] 12880: Fix http://bugs.adobe.com/jira/browse/ SDK-23833 DragDrop of multiple items to Spark List is much slower than to Halo List

    Evtim Georgiev (Adobe) Level 2

      Revision: 12880

      Revision: 12880

      Author:   egeorgie@adobe.com

      Date:     2009-12-12 00:41:36 -0800 (Sat, 12 Dec 2009)

      Log Message:

      ***********

      Fix http://bugs.adobe.com/jira/browse/SDK-23833 DragDrop of multiple items to Spark List is much slower than to Halo List

       

      Problems:

      1. The selection in the drag initiator was not getting properly cleared and it was causing n^2 operations for drag-moving n items.

      2. The selection in the drop target was not getting properly cleared before the dropped elements were inserted, which resulted in n*m operations for inserting n items with m already selected items.

      3. The LinearLayoutVector in the drop target was shifting cached sizes for each element inserted, resulting in m*n operations for dropping n items in front of m items.

       

      Note #3 is not a drag-and-drop specific problem, but a problem for insert/delete in all virtual layout cases (vertical/horizontal).

       

      Fixes:

      1. & 2. - properly clear the selection before the remove/insert operations, as the selection is going to be updated after the operations anyway.

      3. Modify the LinearLayoutVector to store insert/remove requests as pending intervals. The pending intervals get flushed before any size updates/reads are executed.

       

      QE notes: None

      Doc notes: None

      Bugs: SDK-23833

      Reviewer: Hans

      Tests run: checkintests, mustella tests/gumbo/, tests/DragManager

      Is noteworthy for integration: No

       

      Ticket Links:

      ***********

          http://bugs.adobe.com/jira/browse/SDK-23833

          http://bugs.adobe.com/jira/browse/SDK-23833

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

          flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVec tor.as