Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #30171

Re: Fastest web framework

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <tarek@ziade.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'case.': 0.05; 'frameworks': 0.05; 'startup': 0.05; 'things.': 0.05; 'url:bitbucket': 0.05; 'calls.': 0.07; 'tarek': 0.07; 'welcome.': 0.07; 'python': 0.09; 'blocking': 0.09; 'cached': 0.09; 'django,': 0.09; 'received:internal': 0.09; 'sep': 0.09; 'stack,': 0.09; 'url:github': 0.09; 'cc:addr:python-list': 0.10; 'template': 0.11; 'applies': 0.15; 'stack': 0.15; "'hello": 0.16; '(more': 0.16; '11:19': 0.16; 'choice).': 0.16; 'interesting:': 0.16; 'processor,': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.44': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:compute4.internal': 0.16; 'received:mail.srv.osa': 0.16; 'received:messagingengine.com': 0.16; 'received:nyi.mail.srv.osa': 0.16; 'received:osa': 0.16; 'received:srv.osa': 0.16; 'simulate': 0.16; 'tarek,': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'implementing': 0.17; 'tries': 0.17; '>>>': 0.18; 'app': 0.19; '+0200': 0.20; 'skip:- 40': 0.21; 'trying': 0.21; 'bit': 0.21; 'thanks.': 0.21; 'cc:2**0': 0.23; 'example': 0.23; 'seems': 0.23; 'cheers': 0.24; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'guess': 0.27; 'implemented': 0.27; 'besides': 0.27; 'mind.': 0.27; 'went': 0.28; 'run': 0.28; 'post': 0.28; 'app.': 0.29; 'argue': 0.29; 'cpu': 0.29; 'i/o': 0.29; 'measure': 0.29; 'sleep': 0.29; 'things,': 0.29; 'date:': 0.29; 'url:mailman': 0.29; 'summary': 0.29; 'source': 0.29; 'call.': 0.30; 'framework': 0.30; 'hosted': 0.30; 'push': 0.30; 'unlike': 0.30; 'url:2012': 0.30; 'function': 0.30; 'code': 0.31; 'url:python': 0.32; 'running': 0.32; 'url:listinfo': 0.32; 'comments': 0.33; 'goes': 0.33; 'curious': 0.33; 'thanks': 0.34; 'server': 0.35; 'conditions.': 0.35; 'fastest': 0.35; 'pm,': 0.35; 'something': 0.35; 'really': 0.36; 'subject:': 0.36; 'but': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.36; 'does': 0.37; 'uses': 0.37; 'far': 0.37; 'subject:: ': 0.38; 'from:': 0.38; 'some': 0.38; 'things': 0.38; 'received:10': 0.38; 'shows': 0.38; 'little': 0.39; 'application': 0.40; 'header:Received:5': 0.40; 'url:mail': 0.40; 'your': 0.60; 'skip:u 10': 0.60; 'high': 0.61; 'real': 0.61; 'here:': 0.62; 'email name:python-list': 0.62; 'engines': 0.62; 'between': 0.63; 'different': 0.63; 'world': 0.63; 'more': 0.63; 'url:blogspot': 0.64; 'here': 0.65; 'tasks.': 0.65; 'goals': 0.78; 'bench': 0.84; 'benchmark': 0.84; 'fast,': 0.84; 'semi': 0.84; 'server)': 0.84; 'to:addr:live.com': 0.84; 'url:master': 0.84; 'url:template': 0.91; 'engines,': 0.93; 'realistic': 0.93
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=r9J/uibFkHdilXtR43/IXa PmHVY=; b=ZvYjp4mzQUi/D/aQKFHlVLwys7c6gXkttheORic71kfZlHc/tS+DTE wMNzXNFqdtl+V3qoKfwoyYK1Z6a4dUizCI3UQRpfnPJUjBwQ0h0/7cKIuJMUpAXx qWq5E6+XXhWyR6nrpe23OvTFatmdKCRbi6ETIH13WUqD2VrrNiCn8=
X-Sasl-enc V7jWyDm0cLO0LaeX01BHx/378zHIcrjaAM9vPOZy7aEC 1348650456
Date Wed, 26 Sep 2012 11:08:19 +0200
From Tarek Ziadé <tarek@ziade.org>
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
MIME-Version 1.0
To Andriy Kornatskyy <andriy.kornatskyy@live.com>
Subject Re: Fastest web framework
References <50604907.6060405@ziade.org> <DUB117-W20C405466BE1C21E8F0FEE919D0@phx.gbl>
In-Reply-To <DUB117-W20C405466BE1C21E8F0FEE919D0@phx.gbl>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1414.1348650459.27098.python-list@python.org> (permalink)
Lines 83
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348650459 news.xs4all.nl 6868 [2001:888:2000:d::a6]:42429
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:30171

Show key headers only | View raw


On 9/25/12 3:21 PM, Andriy Kornatskyy wrote:
> Tarek,
>
> With all respect, running benchmark on something that has sleeps, etc is pretty far from real world use case. So I went a little bit different way.
That's not a good summary of what the function does. It does not just 
sleep. It does some I/O and CPU bound tasks. The sleep is here to 
simulate a blocking I/O call, besides the DB calls.

The whole function tries to simulate a real application, unlike printing 
'Hello World' - to put the stack under realistic conditions.

The multiplication is cached by the processor, but will still push some 
CPU work on every call.

>
> Here is a live demo (a semi real world web application) that comes with wheezy.web framework as a template:
>
> http://wheezy.pythonanywhere.com/
>
> I have implemented it in a way that it uses one web framework (wheezy.web) and various template engines (jinja2, mako, tenjin, wheezy.template and wheezy.template with preprocessor)... Please see the following post under `Real World Example` section:
>
> http://mindref.blogspot.com/2012/07/python-fastest-template.html
>
> Source code here:
>
> https://bitbucket.org/akorn/wheezy.web/src/tip/demos/template
>
> The real world example shows the difference between template engines implementing the same things. The same applies to web frameworks (more or less depending on your choice).
>
> Thanks.
Great, thanks for the update ! -- that's cool to bench the template 
engines, but this is still not what I had in mind.

What I had in mind was to try each one of the framework with an 
application that does things, and see how the whole stack reacts on high 
load.

But I guess we have different goals - wheezy seems really fast, congrats.


Cheers
Tarek

> Andriy
>
>
> ----------------------------------------
>> Date: Mon, 24 Sep 2012 13:50:31 +0200
>> From: tarek@ziade.org
>> To: python-list@python.org
>> Subject: Re: Fastest web framework
>>
>> On 9/23/12 11:19 AM, Andriy Kornatskyy wrote:
>>> I have run recently a benchmark of a trivial 'hello world' application for various python web frameworks (bottle, django, flask, pyramid, web.py, wheezy.web) hosted in uWSGI/cpython2.7 and gunicorn/pypy1.9... you might find it interesting:
>>>
>>> http://mindref.blogspot.com/2012/09/python-fastest-web-framework.html
>>>
>>> Comments or suggestions are welcome.
>>>
>>> Thanks.
>>>
>>> Andriy Kornatskyy
>>>
>> I would try this with a web app that does more than 'Hello World'
>>
>> You may argue that you're just trying the server stack, but that's not
>> realistic because you don't really measure how the server behaves with a
>> real app.
>>
>> Have a look at
>> https://github.com/mozilla-services/chaussette/blob/master/chaussette/util.py#L188
>>
>> (setup_bench and teardow_bench have to be run on startup and tear down
>> of the server)
>>
>> I would be curious to see how things goes then
>>
>> Cheers
>> Tarek
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>   		 	   		

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Fastest web framework Tarek Ziadé <tarek@ziade.org> - 2012-09-26 11:08 +0200

csiph-web