📝 Cache the negotiation parts (#1455)
Most of the headers are simple and repeatable. Most users will just send
Content-Type: application/json and Accept: application/json like 99% of the time. So, there's no need to run the negotiation process the second time. We already know the final result. So, go through the https://github.com/wemake-services/django-modern-rest/blob/master/dmr/negotiation.py and find places where we can cache header_value -> parser_class or header_value -> renderer_class computations.Prefer not to have any API changes here.
#good_first_issue #help_wanted #performance #opensource_september #django_modern_rest
sent via relator