3 ms·
Django ninja performs better primarily due to relying on pydantic for parsing and validating requests. In a high throughput scenario that's going to be the prim
by jerrygenser 3y ago
Django ninja performs better primarily due to relying on pydantic for parsing and validating requests. In a high throughput scenario that's going to be the primary CPU bound area. However usually network or file io is going to be a limiting factor far before CPU.
Django ninja also is build with async in mind fron the start so immediately opens up possibilities that are not possible with DRF.
Seems like as of 4mo ago the maintainers of DRF added async support via a separate module.
- xwowsersx 3y agoThanks very much for the reply. I actually had not seen that DRF added async support. I must take a look at that! I'm very curious to know how big of an impact switching to AsyncViews would have. Any experience on that front?
- xwowsersx 3y agoI haven't tested very thoroughly yet, but I'm seeing large improvements in latency and throughput by switching to async views!