Page MenuHomePhabricator

Use thumb.php for impact image thumbnails
Closed, ResolvedPublic

Description

Currently the images for the impact module are loaded via File->transform() with the File::RENDER_NOW flag; this results in in ~200 milliseconds spent in $this-file->repoExists() as curl requests are completed.

If we drop the File::RENDER_NOW flag, we can use the thumbnail generation script for the images. So instead of:

background-image: url(/mediawiki/images/docker/default/thumb/c/c0/Palmasdelmarplaya.JPG/59px-Palmasdelmarplaya.JPG);

we would have:

background-image: url(/mediawiki/thumb.php?f=Palmasdelmarplaya.JPG&width=59.751037344398);

and could save ~200 milliseconds per page request.

Event Timeline

Change 507320 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Drop RENDER_NOW flag, use thumbnail script for impact images

https://gerrit.wikimedia.org/r/507320

Change 507320 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Drop RENDER_NOW flag, use thumbnail script for impact images

https://gerrit.wikimedia.org/r/507320

Change 507713 had a related patch set uploaded (by Catrope; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@wmf/1.34.0-wmf.3] Drop RENDER_NOW flag, use thumbnail script for impact images

https://gerrit.wikimedia.org/r/507713

Change 507713 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@wmf/1.34.0-wmf.3] Drop RENDER_NOW flag, use thumbnail script for impact images

https://gerrit.wikimedia.org/r/507713

Mentioned in SAL (#wikimedia-operations) [2019-05-01T23:34:59Z] <catrope@deploy1001> Synchronized php-1.34.0-wmf.3/extensions/GrowthExperiments/: Drop RENDER_NOW for impact module images (T222223) (duration: 01m 04s)

Etonkovidova subscribed.

Example from 1Zhttps://test.wikipedia.org/wiki/Special:Impact/Zilant17

<a class="article-image" href="/wiki/Plants_in_space" title="Go to article" data-link-id="impact-article-image"><div alt="Plants in space" title="Plants in space" class="real-image" style="background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/ISS-38_Young_sunflower_plant.jpg/60px-ISS-38_Young_sunflower_plant.jpg);"></div></a>


background-image: url(//upload.wikimedia.org/wikipedia/commons/thumb/b/ba/ISS-38_Young_sunflower_plant.jpg/60px-ISS-38_Young_sunflower_plant.jpg);