Re:Django Async: What's new and what's next?
by bredren on Friday August 14, 2020 @04:08PM
(#24162644)
How detailed was the profiling on this? Reason I ask is I’ve faced this myself and had to spend a lot of time on both query and serializer optimization.
[ Parent
| on HN ]
Re:Django Async: What's new and what's next?
by Bedon292 on Friday August 14, 2020 @04:51PM
(#24163098)
We used `silk` a lot to profile the app. And basically all the time was being spend inside django somewhere between getting the data from the DB and spitting out the response. We would have things like 15ms in the DB, but 250ms to actually create the response. On simple things. Some of our responses were into multiple second (large amounts of data) but still only spending maybe 150ms in the db. And there was at least two weeks spent on and off trying to improve it before we finally decided we had to go somewhere else. And thats after having to redo some of our queries by hand because the ORM was doing something like 15 left joins.
Re:Django Async: What's new and what's next?
by dd82 on Saturday August 15, 2020 @11:37AM
(#24169614)
You might be interested in https://hakibenita.com/django-rest-framework-slow. If you weren't able to update to a 3.x version that has https://github.com/django/django/commit/a2c31e12da272acc76f3..., this might have bit you pretty hard.
I'd be curious to know more about those 15 joins. Why do you think the ORM was doing those ? And what DB are you using ?