Closed marco-c closed 4 years ago
I tested on a random response. The original size was 200 KB, 20 KB when compressed with gzip, 16,4 KB when compressed with brotli. I'd go with gzip.
I have read the source https://github.com/mozilla/bugbug/blob/master/http_service/bugbug_http/app.py.
The requirement is to compress data
in
1) to make prediction for a bug - https://github.com/mozilla/bugbug/blob/master/http_service/bugbug_http/app.py#L351
2) to make prediction for batch of bugs - https://github.com/mozilla/bugbug/blob/master/http_service/bugbug_http/app.py#L525
as gzip compressed files.
Please clarify on my understanding.
Related References:
Note we want to compress in a way that something like:
response = requests.get("http://localhost:80/push/try/46bef19ad47bbdb7ef5193b1ad63ddd9f1c1adba/schedules", headers={"X-Api-Key": "test"})
response.json()
keeps working as before.
The JSON responses could be gzipped or brotlified.