Re:Django Async: What's new and what's next?
by Bedon292 on Friday August 14, 2020 @04:53PM
(#24163127)
FastAPI uses Pydantic under it for python objects. And we have been tinkering with orjson for the actual json serialization, since it appears to be the winner in json serialization at the moment.
[ Parent
| on HN ]
Re:Django Async: What's new and what's next?
by MapleWalnut on Friday August 14, 2020 @07:05PM
(#24164300)
Why didn't you use Pydantic with Django if the DRF serializers were too slow?
You can also skip the object serialization from the ORM and work with python dicts directly to significantly improve serialization performance from the database.
Re:Django Async: What's new and what's next?
by dec0dedab0de on Friday August 14, 2020 @06:17PM
(#24163961)
Was there still a significant speedup using the standard library json module?
For the DB requests Are you writing sql directly, using a different ORM, or something like sqlalchemy core that makes sql pythonic without being an ORM?
Re:Django Async: What's new and what's next?
by Bedon292 on Friday August 14, 2020 @07:32PM
(#24164501)
Yeah, the main improvement was seen even before playing with orjson. It did help too I think, but only started it yesterday so haven't actually profiled the two side by side. To have real numbers.
And it uses SQLAlchemy under the hood. Can use all of it. But if you want full async all the way down, can just use core and something like encode/databases for the DB access.