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

Dragging lots of files onto an AIR application is slow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Cannot Reproduce
    • Adobe Flex SDK 3.3 (Release)
    • None
    • Drag and Drop
    • None
    • Affected OS(s): All OS Platforms
      Affected OS(s): All OS Platforms
      Language Found: English

    Description

      PROBLEM:
      If you select lots of files onto an AIR application with a reasonable number of UI elements, the drag image will be very choppy, and dropping files onto the app will hang the app for several seconds to several minutes, depending on how many files (in the app this was found in, ~4000 files would result in a 3 minute hang).

      METHOD:
      1) Create an AIR app, and make sure there's a reasonable number of UI components (I started to notice the issue with 700 files in an application with 10 nested VBoxes).
      2) Drag a large number of files onto the application
      3) Drop them onto the application onto a component that accepts the drag

      RESULT:
      During step 2, you'll notice the drag image from the OS isn't smoothly moving across the AIR app. When you drop the files, there is a long delay before you'll get into your AIR application's drop handler.

      I've tracked this down to the Marshalling between NativeDragEvent and DragEvent that occurs in NativeDragManagerImpl (the issue doesn't occur if you return early from NativeDragManagerImpl::nativeDragEventHandler, but does if you simply comment out the event dispatching that occurs within that method). I think the easiest fix for this would be to create a class that extends from DragEvent, that delays the marshalling for things like the DragSource until that object is actually requested. The real issue is that this marshalling can happen 10-20 times for every native drag event that comes through (including native drag over events).

      EXPECTED:
      The drags/drops to be as smooth as going over a native file explorer.

      WORKAROUND:
      Tell the user to drop folders instead of individual files, or really hack the AIR NativeDragManagerImpl implementation.

      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: