List of steps to reproduce (step by step, including full links if applicable):
- This was done on every parse time. Can be checked with hook doGetFileStat() on FileBackendStore.
What happens?:
MediaWiki keep checks the thumbnail of same size as original image does exists. (Even on small 96px square image with no size sets like [[File:Image.png]])
(If it doesn't exist, normally generating thumbnails but it's same size as original so it won't generate and check original image and return it . And this does every time when parsing page.)
This is doesn't affect the performance on local disk drive with high IOPS. But if Images on low disk IOPS or Remote storage backend, this causing serious performance issue. (If parsing page that has many images over 100).
As an example, On page which has 830 images, with Extension:AWS and same region of S3 Bucket (ping to api server is took 0.4ms). It took over 70~90 seconds to complete parsing.
Making cache on Extension:AWS's doGetFileStat(), It reduces 30~50 seconds, However, It's still over 30 seconds, which is enough to Parsoid/PHP gives up with Timeout on VisualEditor.
Related issue(Extension:AWS): https://github.com/edwardspec/mediawiki-aws-s3/issues/42
What should have happened instead?:
If same size as original, just check original images instead.
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
MediaWiki 1.35.2 with Extension:AWS(Used for remote storage test)