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

Dragging performance degradation with multiple WindowedSystemManagers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.4 (Release)
    • None
    • None
    • Affected OS(s): Windows
      Language Found: English

    Description

      Referenced Watson bug #2336507

      Problem: With several Window instances open, each with a DataGrid with dragEnabled set to true, performance suffers and, with enough Window instances, leads to unresponsive applications during a drag operation (livelock perhaps).

      Method:
      1. I've attached a Flex Project Archive. Please import it and set the compiler options to use a Gumbo SDK, Flex 3.3.
      2. Compile and launch in ADL. Once in ADL, the application has 1 button which will open up new Window instances. Each of the Window instances contain a DataGrid where dragEnabled is true.
      3. Click the button to create a new Window instance and resize the new Window to see all its contents. Drag any item in the DataGrid to the labels below the DataGrid. The labels should change and populate with data.
      4. Now, open several more Window instances. I opened 10 in total (not including the WindowedApplication instance).
      5. Try to drag any item in any DataGrid.

      Result:
      The application stops responding. if I suspend the application, I get the stack I've attached (stack.txt).
      Dragging from the DataGrid becomes slower proportional to the number of Window instances opened.

      The following function, dispatchEventToOtherSystemManagers, on the stack looks suspicious. It suggests an n^2 performance problem where each WindowedSystemManager will re-dispatch the event to other WindowedSystemManager instances regardless of whether or not that manager has seen the event. Since each Window has a WindowedSystemManager, performance would degrade exponentially as Window objects are added. private function dispatchEventToOtherSystemManagers(event:Event):void { dispatchingToSystemManagers = true; var arr:Array = SystemManagerGlobals.topLevelSystemManagers; var n:int = arr.length; for (var i:int = 0; i < n; i++) { if (arr[i] != this)

      { arr[i].dispatchEvent(event); }

      } dispatchingToSystemManagers = false; } The event being dispatched is an mx.events.InterManagerRequest with the "isDragging" event name. The variable 'n' is always the number of Window instances, excluding the main, or WindowedApplication instance (http://livedocs.adobe.com/flex/gumbo/langref/mx/managers/WindowedSystemManager.html).

      We've tried this with AIR on Win XP and Mac OSX 10.5.7

      Expected:
      A dragging experience that does not halt the application.

      Workaround:
      None.

      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: