Fastest web framework

Discussion in 'Python' started by Andriy Kornatskyy, Sep 23, 2012.

  1. 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
     
    Andriy Kornatskyy, Sep 23, 2012
    #1
    1. Advertisements

  2. Andriy Kornatskyy

    Roy Smith Guest

    In article <>,
    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.


    That's a nice comparison, thanks for posting it.

    One thing that's worth pointing out, however, is that in a real world
    application, as long as you're using something halfway decent, the speed
    of the framework is probably not going to matter at all. It's much more
    likely that database throughput will be the dominating factor.
     
    Roy Smith, Sep 23, 2012
    #2
    1. Advertisements

  3. Roy Smith, 23.09.2012 16:02:
    > 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.

    >
    > That's a nice comparison, thanks for posting it.
    >
    > One thing that's worth pointing out, however, is that in a real world
    > application, as long as you're using something halfway decent, the speed
    > of the framework is probably not going to matter at all. It's much more
    > likely that database throughput will be the dominating factor.


    Yes, that makes the comparison (which may or may not be biased towards his
    own engine) a bit less interesting. Worth keeping this in mind:

    http://www.codeirony.com/?p=9

    Stefan
     
    Stefan Behnel, Sep 23, 2012
    #3
  4. On 23/09/2012 16:50, Stefan Behnel wrote:
    > Roy Smith, 23.09.2012 16:02:
    >> 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.

    >>
    >> That's a nice comparison, thanks for posting it.
    >>
    >> One thing that's worth pointing out, however, is that in a real world
    >> application, as long as you're using something halfway decent, the speed
    >> of the framework is probably not going to matter at all. It's much more
    >> likely that database throughput will be the dominating factor.

    >
    > Yes, that makes the comparison (which may or may not be biased towards his
    > own engine) a bit less interesting. Worth keeping this in mind:
    >
    > http://www.codeirony.com/?p=9
    >
    > Stefan
    >
    >


    I'd like to say thanks for the link but unfortunately for me, but good
    news for you (plural), is that I've bust a gut laughing out loud, so I
    won't :)

    Oh alright then thanks for the link.

    --
    Cheers.

    Mark Lawrence.
     
    Mark Lawrence, Sep 23, 2012
    #4
  5. If we take a look at web application we can split it into at least two parts, one that renders things out and the other one that does data extraction, e.g. from database (this is what you are pointing at).

    If you made a first call to database you get your list and can easily cacheit. The next call IS without impact that database call may cause... but you still keep serving pages out...

    Thanks.

    Andriy


    ----------------------------------------
    From:
    Subject: Re: Fastest web framework
    Date: Sun, 23 Sep 2012 10:02:28 -0400
    To:


    In article <>,
    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.


    That's a nice comparison, thanks for posting it.

    One thing that's worth pointing out, however, is that in a real world
    application, as long as you're using something halfway decent, the speed
    of the framework is probably not going to matter at all. It's much more
    likely that database throughput will be the dominating factor.

    --
    http://mail.python.org/mailman/listinfo/python-list
     
    Andriy Kornatskyy, Sep 23, 2012
    #5
  6. Andriy Kornatskyy, 23.09.2012 19:42:
    > If we take a look at web application we can split it into at least two
    > parts, one that renders things out and the other one that does data
    > extraction, e.g. from database (this is what you are pointing at).
    >
    > If you made a first call to database you get your list and can easily
    > cache it. The next call IS without impact that database call may
    > cause... but you still keep serving pages out...


    Well, if it was really that easy, you wouldn't be using a database in the
    first place but static pages, would you?

    Stefan
     
    Stefan Behnel, Sep 23, 2012
    #6
  7. The problem is that easy if you have a complete control over what you arecaching.

    Complete control over cache may look a challenging task however with use of cache dependency you can lower it significantly. Take a look here:
    http://packages.python.org/wheezy.caching/userguide.html#cachedependency

    If you have a willing to go even further consider take a look at content caching:
    http://packages.python.org/wheezy.http/userguide.html#content-cache

    Serving static page out of your data is not that impossible... there are still exceptions, of cause.

    Thanks.

    Andriy


    ----------------------------------------
    > To:
    > From:
    > Subject: Re: Fastest web framework
    > Date: Sun, Sep 2 :::::: +0<<<
    >
    > Andriy Kornatskyy, ......2 ::::::
    > > If we take a look at web application we can split it into at least two
    > > parts, one that renders things out and the other one that does data
    > > extraction, e.g. from database (this is what you are pointing at).
    > >
    > > If you made a first call to database you get your list and can easily
    > > cache it. The next call IS without impact that database call may
    > > cause... but you still keep serving pages out...

    >
    > Well, if it was really that easy, you wouldn't be using a database inthe
    > first place but static pages, would you?
    >
    > Stefan
    >
    > --
    > http://mail.python.org/mailman/listinfo/python-list
     
    Andriy Kornatskyy, Sep 23, 2012
    #7
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anatoly Volodko
    Replies:
    1
    Views:
    2,567
    Mattias Sjögren
    Aug 14, 2003
  2. Charles A. Lackman
    Replies:
    1
    Views:
    1,799
    smith
    Dec 8, 2004
  3. Mark
    Replies:
    4
    Views:
    1,970
    Juan T. Llibre
    Nov 17, 2005
  4. moi
    Replies:
    3
    Views:
    4,292
    quaiser_ali
    Sep 26, 2008
  5. Replies:
    2
    Views:
    9,586
    Darryl L. Pierce
    Sep 11, 2005
  6. Hector Santos
    Replies:
    6
    Views:
    1,877
    Mihai N.
    Feb 25, 2010
  7. Post Tudbc
    Replies:
    0
    Views:
    160
    Post Tudbc
    Nov 28, 2008
  8. Andriy Kornatskyy

    RE: Fastest web framework

    Andriy Kornatskyy, Oct 15, 2012, in forum: Python
    Replies:
    2
    Views:
    259
    Demian Brecht
    Oct 16, 2012
Loading...