The people showing you benchmarks comparing Django to ‘NodeJS’ are comparing apples to oranges. Django is not an asynchronous framework (yet!) so you cannot fairly compare the number of raw requests per second the two handle and present that as evidence one is better than the other. Each one has it’s strengths and weaknesses but Django wins hands down in a number of places. Plus it’s not JavaScript, so that’s one thing Django has going for it!
I’ve had immense success with uvloop and asyncio which are much more comparable to NodeJS. Here are some synthetic benchmarks showing it handing over 100,000 requests per second: https://magic.io/blog/uvloop-blazing-fast-python-networking/. I would recommend playing around with asyncio and aiohttp to build some small services and benchmark them yourself, you might be surprised at the speed. Regarding Cython: while some very specific parts of Django could potentially benefit from the speedup Cython would bring we would need to maintain two separate versions: A Cython one and a fallback Python one. This would add a maintenance burden for an uncertain gain and even if you implemented this the raw requests per second Django would reach would not be close to that of an asynchronous framework with the same resources. Typically Django apps are not CPU bound by the Django code itself, and a lot of time is spent waiting on the network for the database or other services. On 3 August 2018 at 18:18:59, Daniel Anechitoaie ( daniel.anechito...@gmail.com) wrote: So the fact that frameworks like Vibora and webapps developed in other faster programming languages like GO/NodeJS/etc. support so many more req/s than Django it's relevant only in benchmarks? And in real life/live web apps the difference in performance won't be noticeable? I have to mention again that I really don't try to start any flame war and I'm legit interested in this. As a huge Python fan and unfortunately lone Python dev among my peers they all flame me when I bring Python up and show me all kind of benchmarks how fast NodeJS (as this is what they use) is vs Python. I'm just trying to make sure I have ground to stand upon. On Thursday, August 2, 2018 at 3:31:37 PM UTC+3, Jason Johns wrote: > > There was a discussion a while back about this https://groups.google. > com/forum/#!searchin/django-developers/cython/django- > developers/Fi4U602GxHA/mE50LOPkBgAJ > > tl;dr not sure what benefits Django would get from it, since the > bottlenecks you experience are most likely non-Django/Python parts of your > project, such as networking latency, db queries, connection initiation, > etc. In addition, pypy is an alternative interpreter that you can drop in > for up to 3.5.x Python versions. > > On Wednesday, August 1, 2018 at 5:21:38 PM UTC-4, Daniel Anechitoaie > wrote: >> >> I'm looking at frameworks like https://vibora.io/ that make use of >> Cython to greatly improve the performance and I'm just wondering if >> something like this would work with Django? >> Was there any discussion (taken into consideration) about using Cython to >> boost the performance of certain aspects of the framework? >> Would it help make it faster? >> >> I really love Python and Django for me is the best web framework out >> there, but you have to notice how fast other frameworks from other >> programming languages are. >> Would using Cython help boost the performance? >> > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/24d4d03d-d9ed-4d7f-9a69-8066846f090e%40googlegroups.com <https://groups.google.com/d/msgid/django-developers/24d4d03d-d9ed-4d7f-9a69-8066846f090e%40googlegroups.com?utm_medium=email&utm_source=footer> . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFNZOJNkcVcjHmuzJ35NAN2mLGhHbWopWribGj3_mGU4hDqcyg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.