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

Improve performance of repository::get_unused_filename() / draftfile_exists()

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.5
    • Files API, Repositories
    • MOODLE_25_STABLE

      Following MDL-37641, this method is far from being efficient as each candidate file name is checked upon the draft area. It would be possible to create a method in file_storage which would return an unused file name using only one single query.

      Also noting that repository::draftfile_exists() could certainly be part of the file_storage too and improved using a single query instead of fetching the whole stored_file object.

            moodle.com Moodle HQ
            fred Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.