Page MenuHomePhabricator

Files served from /static directory for text domains are not gzipped
Closed, ResolvedPublic

Description

The ogv.js media player shim for IE/Safari loads some pre-minified JavaScript blobs directly from static files, as 1) ResourceLoader's validator/minifier barfs processing them and 2) some are needed in non-MediaWiki-specific Worker threads where RL is not easy to integrate.

It seems that these are being served from the wikis' web servers without gzip compression:

They should compress to about 1/4 their original size, which will help loading speed.

Event Timeline

brion raised the priority of this task from to Needs Triage.
brion updated the task description. (Show Details)
brion subscribed.
Krinkle renamed this task from Static JavaScript assets on wikis are not gzipped (ogv.js emscripten modules) to Files served from /static directory for text domains are not gzipped.Sep 8 2015, 5:31 AM
Krinkle added a project: Regression.
Krinkle subscribed.

Change 237369 had a related patch set uploaded (by BBlack):
Compress js (and other text) in varnish

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

PNGs shouldn't gzip well, right?

True. Graphite does it it, though. And shaves off 0.3KB on a 25KB PNG graphic (25,470 bytes uncompressed; 25,152 bytes compressed; via cURL). – graphite/render?png. But I wouldn't be surprised if it actually caused the response to be larger in other cases.

Change 237369 merged by BBlack:
Compress js (and other text) in varnish

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

I've merged a change that should fix this and some other related cases. It's only recently that we started trusting varnish's gzip support in general, and it's about time we expanded on that trust a little.

However, the varnish-level gzip stuff happens on entry of new objects into the cache; it won't re-encode existing cache hits. So, we won't see effects on particular existing URLs until they expire naturally. The max cache lifetime in general is 30 days, but since this the new gzip stuff is applied at all layers, odds are good of any given object falling out of the frontend layer considerably sooner than that and getting gzipped as a result.

Krinkle claimed this task.