S3-Uploads icon indicating copy to clipboard operation
S3-Uploads copied to clipboard

Medialibrary slower to load

Open robbertrosario opened this issue 2 years ago • 3 comments

Loading images at the front-facing part of our website is going smoothly however ever since offloading the images, we've noticed that the WP Media Library takes about ~25 / ~30 seconds to load the 80 thumbnails and the same for every page thereafter.

Has anyone else faced this problem? is there anything you can do this about this?

robbertrosario avatar Feb 08 '23 13:02 robbertrosario

The media library will be reading your images from S3 rather than the local filesystem so you should expect this to be slower. The pagination in place should take care of this for the most part, so you shouldn't be seeing 30s load times though, so I'd suggest debugging your performance using a tool like XDebug.

rmccue avatar Feb 08 '23 14:02 rmccue

The media library shouldn't have to read the files at all from s3 or the filesystem. It's possible a plugin (or lack of attachment metadata around sizes) is however trying to read directly from images files. I've seen that many times before. Though it's bad practice to do that (and afaik Core does not do that anywhere), it's not unusable to see people continue to do that, as the performance impact when using local disk is a lot less than external, such as s3.

joehoyle avatar Feb 08 '23 17:02 joehoyle

Thanks for both your responses, i've turned every other plugin off but still see around a ~24 / ~25s delay, where admin-ajax is blocking things before the images get loaded. It's a testing environment and it has basic auth, not sure if that somehow impacts the loading time.

robbertrosario avatar Feb 09 '23 14:02 robbertrosario