Uploaded image for project: 'Pivot'
  1. Pivot
  2. PIVOT-878

Show FileBrowserSheet while Initializing

    XMLWordPrintableJSON

    Details

      Description

      If the list of file roots returned by http://docs.oracle.com/javase/1.4.2/docs/api/java/io/File.html#listRoots() includes more than a few network drives (primarily on windows where each mapped drive is its own "file system root"), or if the initial path on the FileBrowserSheet maps to a device that takes a while to "spin up", the FileBrowserSheet may not appear on the screen for several seconds making the Pivot app appear unresponsive. It would help if there were some indication of activity immediately after the call to the FileBrowserSheet.open() method. The FileBrowserSheet could be displayed in a "loading" mode and then switched to its normal display mode once the potentially long-running initialization has completed.

      In this case, the long running code is around line 936-947 of the 2.0.2 release source file at wtk-terra\src\org\apache\pivot\wtk\skin\terra\TerraFileBrowserSkin.java

      Steps to reproduce:

      1. Create a Pivot application that opens a FileBrowserSheet using a button.
      2. Map about 6 network drives or connect external hard drives to drive letters on a machine running windows
      3. Wait enough time for the power-management "spin down" on some or all of the mapped or connected drives
      4. Run the Pivot application and click the button that opens the FileBrowserSheet
      5. Nothing appears to be happening for several seconds (far too long) while the JVM collects the results of File.listRoots() to populate the "driveListButton" listData.
      6. Finally after several seconds, the FileBrowserSheet appears.

        Attachments

        1. tptp_profiler_exec_call_tree_screenshot.png
          178 kB
          Ronald Thomas
        2. PIVOT-878_example_src.zip
          3 kB
          Ronald Thomas

          Issue Links

            Activity

              People

              • Assignee:
                rwhitcomb Roger Lee Whitcomb
                Reporter:
                rthomas67 Ronald Thomas
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: