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

Improve performance of get_imageinfo

    XMLWordPrintable

    Details

    • Affected Branches:
      MOODLE_311_STABLE

      Description

      Getting image metadata from the File API pulls the file back down locally:

      https://github.com/moodle/moodle/blob/master/lib/filestorage/file_system.php#L382-L384

      In particular this gets used in a bunch of places when generating html to render an image tag with the right dimensions.

      This data almost never changes and this is all very inefficient. As this is used so often for thumbnails I'm proposing to make the width and height metadata fields directly in the mdl_files table

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              brendanheywood Brendan Heywood
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Matteo Scaramuccia, Andrew Nicols, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: