enthought / tabs

Default Repo description from terraform module
0 stars 0 forks source link

Use flask compress #83

Closed kjordahl closed 8 years ago

kjordahl commented 8 years ago

Introduces a new dependency on flask-compress to automatically gzip json over the wire. This is ~2x faster for me for initial loading of frames from barataria (3 fps, up from 1.5 fps).

Also sends proper mimetype for json data by using flask.jsonify.

johntyree commented 8 years ago

Oh wow. It wasn't gzipping already? Yuck.

kjordahl commented 8 years ago

We could probably do better with another scheme (maybe topojson for geo features, BSON/msgpack/protobuf/etc. for general data), but this is better for now.

johntyree commented 8 years ago

I played with using msgpack and found that it had pretty much no effect. Browsers have gotten really really good at parsing JSON. It's just down to bandwidth now and with the truncated float-strings we aren't beating it with msgpack.