Page MenuHomePhabricator

Images: Image responses could be cached to avoid identical API reqs (and also speed up parse)
Closed, ResolvedPublic

Description

Take a look at: http://parsoid.wmflabs.org:8001/perfstats?orderby=time:parse

Take a look at the first entry there: https://ja.wikipedia.org/w/index.php?title=%E6%9D%91%E6%AD%A3%E3%81%AE%E5%A6%96%E5%88%80&action=edit

On this page, check one of the transclusions and look at the expanded source on it as follows: "node parse --prefix ja --dump tplsrc < /tmp/wt_snippet" and you find this:

....

[[ファイル:Go u.svg|20x20px]]
[[ファイル:Go u.svg|20x20px]]
[[ファイル:Go u.svg|20x20px]]
[[ファイル:Go u.svg|20x20px]]
[[ファイル:Go u.svg|20x20px]]

....

Now, Parsoid shoots off an API request for each image whereas this is unnecessary after the first response. This can significantly speed up the parse of this page.

The same is true for https://pl.wikipedia.org/wiki/Podsumowanie_start%C3%B3w_zespo%C5%82u_Lotus_w_Formule_1 which has a lot of identical image flags.

Caching could help here.


Version: unspecified
Severity: normal

Details

Reference
bz54522

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:15 AM
bzimport set Reference to bz54522.

Arlo, IIRC you worked in this area. Is this case already handled?

It should be.

In 6e3c87504514201fc628c51977b3fd14a37667b0 we cached ImageInfoRequests.