Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36548

Poor performance (can trigger slow script warnings) in file picker detail (list) view

    Details

    • Testing Instructions:
      Hide

      TEST THE FILEPICKER IN ALL SUPPORTED BROWSERS (explore)

      • Add a file resource
      • Click the "Add..." button in the file manager to launch the file picker
      • In the Server Files browser, navigate to a path that contains many files and/or folders, such as an imported "Legacy course files" folder
      • Switch between the three views - icons, detail (list), tree - and confirm that it switches to detail (list) view quickly and without triggering any slow script warnings
      • From the detail (list) view, navigate around and choose a file
      • Save the file resource to confirm that it works as expected

      It may be helpful to try this before and after applying the patch, to get a feel for the difference in performance.

      Show
      TEST THE FILEPICKER IN ALL SUPPORTED BROWSERS (explore) Add a file resource Click the "Add..." button in the file manager to launch the file picker In the Server Files browser, navigate to a path that contains many files and/or folders, such as an imported "Legacy course files" folder Switch between the three views - icons, detail (list), tree - and confirm that it switches to detail (list) view quickly and without triggering any slow script warnings From the detail (list) view, navigate around and choose a file Save the file resource to confirm that it works as expected It may be helpful to try this before and after applying the patch, to get a feel for the difference in performance.
    • Workaround:
      Hide

      Don't use the detail (list) view.

      Show
      Don't use the detail (list) view.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-36548_master

      Description

      When a large number of files and/or folders are being displayed in the file picker, the detail (list) view is very slow (compared to icon and tree views) - to the point that it will trigger slow script warnings in some cases.

      This is due to the way that the data is added to the YUI DataTable - it's being added using the addRows() function after the DataTable is initialised. Providing the data when initialising the DataTable seems to alleviate this issue - the YUI DataTable is much more efficient at handling initial data than at adding rows post-initialisation, perhaps because it doesn't expect to be given entire large datasets via addRows().

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/13