We're already exposing 640px, 800px, and 1024px thumbnail URLs in the lead response.
If we also add the 320px then we don't need a separate request in the app to get the page thumbnail for saved pages / history.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add 320px thumbnail URL to lead image response | mediawiki/services/mobileapps | master | +21 -5 |
Related Objects
Event Timeline
Change 281663 had a related patch set uploaded (by Mholloway):
Add 320px thumbnail URL to lead image response
Given that this change changes the response format, will you also need us to regenerate all content in RESTBase? If so, please reopen this task and assign it to me.
@mobrovac, @Mholloway Yes, eventually. I'm not in a hurry about this one. We might be able to combine it with other changes. I would really like to know more about the cost of pre-generation. How long does it take for all wikis? How much does it impact the response time?
If there are plans to change the output of other endpoints in the near future and you don't plan to remove the code dealing with getting the 320px thumb in the app then, sure, we can wait.
I would really like to know more about the cost of pre-generation. How long does it take for all wikis? How much does it impact the response time?
We are probably talking about an ETA of a week or so for all wikis. Pre-generation basically purges all of the titles from Varnish, so the first access to any given title has an increased latency of up to 50ms (but usually less). The biggest toll is on Cassandra space and operation, though, so we should calculate when to do extra pre-generation rounds (in the sense that we should bundle multiple output changes to only one pre-generation round as much as possible).
To select the right pages for purging we need to look for all pages that have a set of lead image thumbnail URLs but not the 320 version of it yet. Something like
lead.image.urls && !lead.image.urls["320"]
This has been deployed a while ago. So, most active page should have been updated by now. We just need to get the less frequently edited pages re-generated.