Re: Django performance vs others

442 views
Skip to first unread message

Daniel Sokolowski

unread,
Oct 4, 2012, 9:18:11 AM10/4/12
to django-d...@googlegroups.com
Thank you for sharing that! To me it’s very interesting to see no PyPy advantage on other tests – PyPy claims otherwise: http://speed.pypy.org/ – but that could be explained by assuming PyPy tests are hand chosen to show the advantage.
From: Moonlight
Sent: Thursday, October 04, 2012 3:50 AM
Subject: Django performance vs others
 
I found the following benchmarks recently:
--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/f93terHDsP8J.
To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
--

Roberto De Ioris

unread,
Oct 4, 2012, 9:36:53 AM10/4/12
to django-d...@googlegroups.com

> Thank you for sharing that! To me it’s very interesting to see no PyPy
> advantage on other tests – PyPy claims otherwise: http://speed.pypy.org/
> but that could be explained by assuming PyPy tests are hand chosen to show
> the advantage.


PyPy is extremely faster when it can abuse its JIT, this rarely happens on
'classic' webapps where the biggest part of the response cycle is spent
waiting for dbs (or external services in general).

This is the same reason why benchmarking application servers is generally
useless :)

--
Roberto De Ioris
http://unbit.it

Stan

unread,
Oct 4, 2012, 10:14:43 AM10/4/12
to django-d...@googlegroups.com


On Thursday, October 4, 2012 9:50:35 AM UTC+2, Moonlight wrote:
I found the following benchmarks recently:


I still can't see why people wast so much time in such biased "Hello world" tests to claim a definitive "X is the fastest Python web Framework."
Are the Hello world applications are strictly the same (sessions, auth etc) ?
 
Anyway, there are so many ways to fail a project and the reason is never on the pseudo-helloworld benchmark bad results. Database optimization, ORM, API quality, documentation, libraries, security.
Does your framework allow users to deliver in a limited time ? That is the true question.

Stanislas.

Juan Pablo Martínez

unread,
Oct 4, 2012, 12:07:36 PM10/4/12
to django-d...@googlegroups.com
+1 Stan

--
You received this message because you are subscribed to the Google Groups "Django developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/WWB5Fc8ikFMJ.

To post to this group, send email to django-d...@googlegroups.com.
To unsubscribe from this group, send email to django-develop...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.



--
juanpex

Amirouche Boubekki

unread,
Oct 4, 2012, 1:49:53 PM10/4/12
to django-d...@googlegroups.com
Are the Hello world applications are strictly the same (sessions, auth etc) ?
I still can't see why people wast so much time in such biased "Hello world" tests to claim a definitive "X is the fastest Python web Framework."

I still can't understand why people wast so much time claiming the work of others is useless because you actually mean useless, isn't it ?


Database optimization, ORM, API quality, documentation, libraries, security.

I take for granted that at least you have some notions of what makes a good Web framework. But, Is there any verb that I should guess to make it possible to build conversation about this statement ? In particular, what do you mean by API quality, because that is a particular area I'd like to improve.

Does your framework allow users to deliver in a limited time ? That is the true question.

Huhu! I think you are refering to the old line «Web framework for perfectionnist with deadlines» which was well translated in french and with a formulation which can stands time and projects as «Web framework for perfectionnist in a hurry». It was maybe a legit claim 7 years ago (almost ten and two hundreds years at the Web scale) because all solutions at that time were bloated, broken, not as cool or simply not as good as Django, but today is almost 2013. Don't expect people to sit down and wait for Django to leave 1.0 branch to rework the template engine, get rid of managers, provide a framework for asynchronous tasks that implements ack and doesn't try to delete faulty tasks because they expired, reconsider what can be done in Django to make the life of frontend developpers easier regarding the pervasive use of Javascript clients, provide a framework for service oriented applications, take into consideration multiple user editing in the admin, multiple databases transactions if doesn't already, make it work on Python 3, make the admin even more hack-friendly, validate/testify any other useful apps that are nowdays taken for standards in webdev and be simply better at what it does already well, I agree, and start eating market shares of self proclaimed entreprise solutions™. Otherwise said, simply impress me again and stands out or consider the fact that today Django is just like any other Python Web framework, no more, no less, with a good documentation and numerous zealots. It maybe be superflus to look for speed when there is other more useful/important/sexy work to do, but it might also not be possible to do this improvement without forking or starting from scratch.

The project you are talking about got its fair number of critisism on Python ML thread already. Do you think this guy is stupid? He was simply starting to market his work with a simple benchmark no more, no less, and I'd bet it perform well on full applications too. Most probably he was hacking in his garage with an idea, getting a Python framework out and make it as good as Django and maybe better. And according to the numbers we have now it is, according the the template syntax it is (or you like to write parsers in Python), according the well crafted and separated repositories it is (maybe a personal preference I agree). You can take for granted that this framework doesn't have an admin area yet, and couldn't make the mistake of recomputing most urls for every request, making it useless for any user-facing private area of reasonable scale, yay, there are top notch admin projects out there that integrate recognized html5 frameworks of today, but I agree this is a minor issue for people ready do write some code instead of sneaking into the admin. According to you not only this guy may be stupid, but his work might be useless. Maybe you do not know what competition is ? Or, you don't know what free and open source software is ? It looks like the latter is true at least contributing code doesn't seem to be part of your agenda or maybe your are too much concerned about putting down the work of others and making zillions out of the work of some. But I guess you are just venting and not improving the discussion at all. Most probably because you cannot do «un pouillème» of what this guy did and of what I hope he will do, you are well behind this guy in terms of contributions not only for free and open source industry but also Python and Django in particular. You may (or someone else will) argue about it being junk-code or code pollution, my bad, this exact disease did not serve the Javascript and PHP community that badly when one compares market penetration. The only pollution I know is the shitload of thinking patterns people like you have in reserve.



Amirouche

Jacob Kaplan-Moss

unread,
Oct 4, 2012, 2:24:43 PM10/4/12
to django-d...@googlegroups.com
Hey folks --

This thread's pretty off-topic for django-dev. Can you please take it
elsewhere? Thanks.

Jacob
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.

Babatunde Akinyanmi

unread,
Oct 5, 2012, 4:26:08 AM10/5/12
to django-d...@googlegroups.com
That was so long I can't even remember what I read.
--
Sent from my mobile device

Jacob Kaplan-Moss

unread,
Oct 5, 2012, 8:23:31 AM10/5/12
to django-d...@googlegroups.com
On Fri, Oct 5, 2012 at 3:26 AM, Babatunde Akinyanmi
<tunde...@gmail.com> wrote:
> That was so long I can't even remember what I read.

C'mon. This sort of comment is toxic and completely uncalled-for. It
adds nothing to the conversation, and only serves to fan flames.
Please don't do this here.

Jacob

Moonlight

unread,
Oct 5, 2012, 9:08:42 AM10/5/12
to django-d...@googlegroups.com, rob...@unbit.it
Roberto, is there a way run uwsgi on pypy? I think the article shows best of two words: cpython and pypy.... and uwsgi on cpython, while gunicorn on pypy. I do not believe there were attempt to compare web servers...

Moonlight

unread,
Oct 5, 2012, 9:17:02 AM10/5/12
to django-d...@googlegroups.com
What is wrong with hello world application if you are testing web application stack?

Choosing framework X over Y doesn't guarantee any success to project. Good thing to know your framework has a limit... that also tells me how effective one or other implemented... I guess it tells that.

I have had no idea until recently that django template are sooo slow... other engines do the same... but spent less time. What the cool feature prevent it for rendering it faster?

Roberto De Ioris

unread,
Oct 5, 2012, 9:21:30 AM10/5/12
to Moonlight

Il giorno 05/ott/2012, alle ore 15:08, Moonlight <moonligh...@yahoo.com> ha scritto:

> Roberto, is there a way run uwsgi on pypy?

Yes http://projects.unbit.it/uwsgi/wiki/PyPy

but there is no particular advantage (and you will lose some advanced features like full threading support and so on...)

currently it is no more than a test toy for the pypy guys and their cpyext implementation


> I think the article shows best of two words: cpython and pypy.... and uwsgi on cpython, while gunicorn on pypy. I do not believe there were attempt to compare web servers...
>

oh yes, for sure, i was only giving an example on mis-readed benchmarks, and giving an explanation on why PyPy is (still) not particular 'powerful' in classic web-apps scenario

--
Roberto De Ioris
http://unbit.it
JID: rob...@jabber.unbit.it

Stan

unread,
Oct 5, 2012, 11:03:11 AM10/5/12
to django-d...@googlegroups.com


On Friday, October 5, 2012 3:17:02 PM UTC+2, Moonlight wrote:
What is wrong with hello world application if you are testing web application stack?

I Moonlight (or maybe Andriy ?). Some thoughts :
  1. Don't be directly involved in a product you are benchmarking against. that's bad ;
  2. Make a relevant bench for the conclusion you are claiming. Print "Hello world" is not a benchmark to say a framework is faster than another one. Look at graphical card benchs. They don't display just a rotating cube at very low resolution with 4 colors ;
  3. Be scientifically rigorous. Every framework make stuff under the hood when you initialize a project that you can't disregard because the impact is high. Stacks and hooks (auth, session, localization) that can be tuned (or not) in your project settings for instance. So the same "Hello World" (which is only the tip of the fucking iceberg) can run 100 times faster according to your settings.
The problem with Hello World is that it is way too simple, an insignificant parameter in the numerous/heterogenous/significant other parameters. It's like trying to work out the best cyclist with a 100m rush with very different kind of bike plus a backpack of different weights. That's why we have Le tour de France. Put some weight on what you test in order to outweigh other parameters.

I do not say that this bench is absolutely useless. It can be used to show a regression, a bug, test the Apache stack. Not to make framework comparisons. 

 
Choosing framework X over Y doesn't guarantee any success to project. Good thing to know your framework has a limit... that also tells me how effective one or other implemented... I guess it tells that.

I have had no idea until recently that django template are sooo slow... other engines do the same... but spent less time. What the cool feature prevent it for rendering it faster?

I think this is not a scoop that Django template engine is not the fastest and you are free to use another one.
But I would like to say, if you are in a serious business, don't give a fuck. This is the last reason to fail a real-life project and a pretty low-benefit optimization.
Ok, this is important, but don't over-estimate it.

By the way, I had the curiosity to take a look at Python ML entry which is called "Fastest web framework" and I the Wheezy framework. The cache api - for instance - is not something I would call well designed and useable :

@response_cache(none_cache_profile)
def change_price(request):
    ...
    with cache_factory() as cache
        dependency = CacheDependency('list_of_goods')
        dependency.delete(cache)
    return response

Is it working code ? where does the returned response come from and how does the 3 lines above can impact it ?
If you want to turn off the cache you have to change all that logical code, not just the @decorator, right ? Seriously, dude.

If you try to sell your business, this is not the right way and not the right place, so maybe this should continue on Python Mailing list (or not).

Stan.
 

Jacob Kaplan-Moss

unread,
Oct 5, 2012, 12:07:31 PM10/5/12
to django-d...@googlegroups.com
Stan --

Please watch your tone. Remember that this is a professional context.
The obscenity and combativeness aren't OK here.

Please everyone, take this elsewhere. This is turning into a flamewar,
and that's not what this group is for. If people can't let this thread
drop I'm going to have to employ more heavy-handed moderation, which I
really don't want to do. I'd really appreciate it if everyone here
could act like adults and just move on.

Jacob
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-developers/-/aFq1kZhTe9QJ.

Moonlight

unread,
Oct 16, 2012, 6:36:59 AM10/16/12
to django-d...@googlegroups.com

Tom Christie

unread,
Oct 16, 2012, 7:17:32 AM10/16/12
to django-d...@googlegroups.com
Please.  As Jacob has already made clear, this thread isn't helping move anything forward.
Can we please respect his request and move on.

Django's community is absolutely interested in addressing practical steps towards improving performance and would no doubt welcome specific work towards profiling the request-response cycle or otherwise improving the codebase.

The intention may be well-meaning, but links to 3rd party benchmarks without context, comment, or thoughts on actionable tasks are clearly not adding anything to the discussion, and I'm quite sure the core devs have better things to do with their time than thread moderation.

  - Tom
Reply all
Reply to author
Forward
0 new messages