I have a web application written with pyramid frameworks. One of my views is taking three seconds to be downloaded at the client side.
I want it to be served as a gzip file, is it possible to it using a build-in feature of pyramid?
The question here does not discuss why it is slow and if 3 seconds is acceptable. Compressing may add further delay. Instead, the author should show source code in the question and then people can suggest how to make it faster.
Pyramid has, however, buildin feature called encode_content
for this:
It will encode content already written to response and then change content-length header.