Jump to content

Necessary to call getImageDimensions() for JSON-LD in Pages?


Martin A.

Recommended Posts

Posted

Hi,

Just discovered that there is a call in IPS\cms\modules\front\database\records::manage.php(237) where you fetch the record image in order to get the image dimensions, This method call alone wastes more than 500ms on every article request that have a record image, which is all of them. We went from ~1.2s to ~550ms by removing this.

We're storing our images in an S3 bucket, with CloudFlare as a CDN layer on top of that. getImageDimensions() ignores the CDN layer, and goes straight to the source, and that can cause an issue when the distance between the web server and S3 is far. Even the fact that the server needs to make an external request is enough to cause a noticeable delay. 

Since the image dimension is unlikely to change all the time, can't we store this information in the records table? 

AWS S3 users will have to pay extra for this too, as their CDN doesn't absorb these requests.

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...