Page MenuHomePhabricator

Implement lazy-loading of image results
Closed, ResolvedPublic


When searching for images, results are loaded in batches of 40 at a time. Currently it is very easy to hit rate limits on commons this way; see parent task (T258833) for details.

Introducing a lazy-loading behavior for images (and potentially other result types that have thumbnails, like videos) will hopefully mitigate this problem somewhat, and will also generally improve performance (both actual and perceived).

QA Notes

Should be visible on production Commons starting Wednesday, August 12.
This might not eliminate all 429 thumbnail errors, but it should greatly reduce them since images won't load until they enter the viewport. It is possible that rapid, aggressive scrolling to the bottom of the screen repeatedly may still cause the rate limit to be hit.

Event Timeline

Related Gerrit patch (will update ticket number in next patchset so it appears here automatically):

Change 616918 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Add a base Image.vue component with lazy loading

Change 616918 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add a base Image.vue component with lazy loading

The loading of image looks really smooth in betalbs - and no 429 errors were present. Needs to be checked in production, of course, since betalabs is a quite different environment.