

Web API performance: profiling Django REST framework. - tomchristie
http://dabapps.com/blog/api-performance-profiling-django-rest-framework/

======
bhauer
Let me preface my comment with a statement that this is very interesting work
and it's appreciated. Nevertheless, my worry with the advice given here is
that it provides comfort to those unwilling to evaluate other options:
platforms or frameworks that may provide the necessary performance
characteristics without as many rounds of optimization. Avoidance of premature
optimization and avoidance of selection of a well-fitting platform and
architecture are not the same thing, though they are often confused for one
another.

If you are familiar with Django, and better yet familiar with Django REST, and
do not have the time to invest in considering other options (learning about,
experimenting with, and taking the necessary time to properly digest), this
article gives useful data and demonstrates how to reach performance levels
that may be acceptable for your use-case, with some concessions (notably,
caching).

However, if you are willing to evaluate other options, there are many
platforms that achieve the synthetic target established by the "third
bar"\--that is, 25ms of server-side processing while doing so _with_ client-
side concurrency and _without_ resorting to caching or other potentially
complicating/limiting concessions.

If you are a Django developer, by all means leverage advice such as this. If
you are not, consider looking to alternatives that meet your performance
target out of the box. Perhaps you will find something new that you'll
eventually be glad you looked at.

~~~
mrtimo
honest question: what are the names of other platforms similar to Django REST
that you would recommend to this newbie.

~~~
pplante
we use tastypie: django-tastypie.readthedocs.org

for the most part it works really well. for a while the development was sort
of stagnant/dead while the developer was looking for people to take it over.
recently (2-3 months ago) a team has formed around the project and is actively
maintaining and pushing new features again.

------
nobodysfool
I think the takeaway is not 'use Django REST and caching' but 'profile your
web api and tweak it'. Good use of profiling here.

------
ergo14
Some good advice there, but I believe that plugging a middleware like
[https://errormator.com/](https://errormator.com/) would give even better
insight into what is happening in your applications.

(disclaimer: I've created errormator)

~~~
akoumjian
Your carousel needs to stop after a using manually clicks an arrow. I tried
clicking back a slide to read it and it just kept right on spinning. I can't
even read about your features.

~~~
ergo14
This should be fixed now :-)

~~~
akoumjian
Much better, thanks.

