Page MenuHomePhabricator

ForeignApiRepo should process responsive image requests in parallel
Closed, DuplicatePublic

Description

When you include an image, foreign api repo can make up to 7 requests. One for info about the image, 3 for info at various sizes, 3 for the actual images at various size (if apiThumbCache is enabled).

This is a bit crazy. These should be processed in parallel instead of one after each other (Not just for parallizability, but using HTTP/1.1 pipelining or HTTP/2 would cut down all the time from TCP and TLS handshakes, which is probably significant in this context).

Perhaps one implementation would be for ApiForeignFileRepo to optimistically fetch all 3 versions on request of first version if $wgResponsiveImages is true, and cache them all.