reading This question it looks like I can setup DRF within an existing django project.
That got me thinking... I have a django application that uses ajax calls which return very simple view partials which quickly display on the page, and then a few seconds later another ajax call is made to return another view. (you can think of it like the Whac-a-mole games, but each mole is a different view partial being returned from the server.)
so essentially I have 30-50 calls per minute to mysite.com/ajax_new_mole with a view similar to (just made this up on the fly, ignore any errors)
...
def ajax_new_mole(request):
random_id = get_random_mole_id()
random_mole = Mole.objects.get(id = random_id)
return render(request, 'partials/_mole_photo.html, {'mole':random_mole})
...
and the _mole_photo.html template
{% load load_cloudfront %}
<div class="img-wrapper" id="{{ photo.id }}">
<span class="album-title" id="album-title">Title: {{ mole.name }}</span>
<img src='{% load_cloudfront_medium mole.name %}' id="image{{ photo.id }}"/>
</div>
Now to my question. In this situation. Would Django REST Framework offer any performance benefits in the reduced overhead for responding to and rendering this content?