compress response for oknesset.org/api/member (Task #2635)


Added by Benny Weingarten over 2 years ago. Updated over 1 year ago.


Status:Closed Start date:01/16/2012
Priority:Normal Due Date::
Assignee:- % Done:

100%

Category:- Spent time: -
Target version:-
מתאים כמטלה ראשונה:Yes

Description

Currently the result for the api is over 2 MB; This size can be reduced by zipping the response


History

Updated by דוד שמעון over 2 years ago

Will adding 'django.middleware.gzip.GZipMiddleware’ to 'MIDDLEWARE_CLASSES’ will solve this task?

https://docs.djangoproject.com/en/1.3/ref/middleware/#module-django.middleware.gzip

Updated by Benny Weingarten over 2 years ago

Could be. I am not proficient enough in Django to know how to implement this.
From what I’ve seen in the code, the API is implemented via the django-piston library. I don’t know where is the correct place to add the 'gzip_page()' directive from the GZIPMiddleware library.

דוד שמעון wrote:

Will adding 'django.middleware.gzip.GZipMiddleware’ to 'MIDDLEWARE_CLASSES’ will solve this task?

https://docs.djangoproject.com/en/1.3/ref/middleware/#module-django.middleware.gzip

Updated by Yo'av Moshe over 1 year ago

I think this was solved already. the response size is 29.12 KB, and it is gzipped.

Updated by עפרי רביב over 1 year ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

Also available in: Atom PDF