4 ms·
No, I agree with you. It's 2022 and I have thought only once that it would be neat to have async methods from Django, but only as some 'cool thing to try'. I d
by Demiurge 4y ago
No, I agree with you. It's 2022 and I have thought only once that it would be neat to have async methods from Django, but only as some 'cool thing to try'.
I don't actually actually know if there would be any substantial benefit. It's like when I tried PyPy as my django interpreter. It gave a few percent speed increase in "real world" but created extra work for deployment.
I've been using Django non-stop from 0.96, and it just works, and you can build around it. If I was running a trading clearing house, or Instagram, I'd probably care about marginal improvements, and then use another language. But for Django, just tuning the workers per server node, and using django-rq jobs works really well.
Kudos for the enthusiasts working on this though, because 'async' is a new Python feature/meme, and supporting it is just being a good ecosystem player.
- nilsbunger 4y ago> If I was running a trading clearing house, or Instagram, I'd probably care about marginal improvements, and then use another language. Ha, Instagram was written in Django!
- collinmanderson 4y agoRight, though they're stuck on 1.8 (upgraded to 1.8 only so they could use python3), and really just use it for request/response/views, not ORM or anything else.
- throwaway_4ever 4y agoAre they using DRF? Because obviously mobile app can't use templates and Django doesn't default support REST endpoints, does it?
- collinmanderson 4y ago> Django doesn't default support REST endpoints, does it? You just have to manually call json.parse(request.body) for incoming requests and return JsonResponse(data). And you generally need to serialize the data yourself. Django does have some built-in model serialization, but that's mostly for import/export data, not really for sending to the browser.
- Demiurge 4y agoThats why I mentioned it, lol. I figured a few percentage points improvements in perf for Instagram == $$$