You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Addonss: use standard Response object and don't sort response (#12334)
The json response isn't meant to be human-readable, sorting and
indenting is slow (30 times slower than just returning a normal
response). But this only noticeable with big responses, so in reality it
won't affect much of the performance. Also, since we are using DRF, we
should always return Response objects, they are the recommended way of
writing APIs. I wasn't able to remove one usage of JsonResponse, but we
should use an exception instead like suggested in
https://stackoverflow.com/questions/46713047/django-rest-framework-return-response-from-dispatch,
I didn't want to make a backwards compatible change here.
0 commit comments