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

Improve performance of get_imageinfo

    XMLWordPrintable

Details

    • 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

              Unassigned Unassigned
              brendanheywood Brendan Heywood
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: