djangoperformanceuser-interfacedjango-rest-frameworkbrowsable

DRF - browsable interface very slow with PrimaryKeyRelatedField


How can I make Django Rest Frameworks browsable UI fast with RelatedField?

I'm aware this has already been asked here: Django REST Framework: slow browsable UI because of large related table but the answer is no longer valid for new versions of DRF

Including two PrimaryKeyRelatedFields gives me a 5s+ load time, removing them takes me back down to under .3

I've tried setting html_cutoff=100 or even html_cutoff=1but it seems to make no difference to load times.

Any ideas? currently on DRF '3.3.2'

Edit: tables involved have 12000 to 120 records - but it would be great to handle much larger amounts


Solution

  • Not quite the answer I am looking for, but currently it looks like there is activity around this already on github - https://github.com/tomchristie/django-rest-framework/issues/3329 with a little luck, one of those patches will get merged soon