Giter Site home page Giter Site logo

whatsitdoing-morepath's Introduction

What is it doing

This directory contains a very simple "hello" Morepath app, wrapped into a repoze.profile middleware. This is to compare Morepath along these lines:

http://plope.com/whats_your_web_framework_doing

http://plope.com/whatsitdoing2

http://plope.com/pyroptimization

After running the buildout, starting the app goes like this:

$ bin/devpython app.py

Starting it without profiler for raw performance measurement is like this:

$ NO_PROFILE=1 bin/devpython app.py

The server uses Waitress by default.

The Apache bench command is this:

$ ab -n1001 -c4 http://localhost:8080/

To see the profiler output, go here:

http://localhost:8080/__profile__

It is also interesting to run the benchmark (without profiling) with gunicorn. gunicorn is installed by the buildout. The command to start with gunicorn is this one:

$ bin/gunicorn -w 4 app:the_app

Note that this doesn't turn on profiling. The ab command has to be adjusted to use port 8000:

$ ab -n1001 -c4 http://localhost:8000/

To reach max requests per second in a benchmark, increase -n by 10 at least.

Results

December 2013

Morepath gets about 100 lines of profiler output. A significant fraction of this appears to be Werkzeug related, or language built-in stuff. Reg also adds to the output. This means Morepath is around Flask in the "rankings" given by Chris McDonough, more than Pyramid or Django, less than Zope 2, Grok.

I don't think this is too bad without trying, especially given Morepath's factoring in small generic functions, with a model-driven behavior baked in. Perhaps it is worthwhile to write some of Reg's code in C code (optionally) so Reg can be hidden from the debugger. Another thing to explore might be Werkzeug, though that's all pretty hidden from normal use.

Without profiling: with Waitress I got about 1000 requests per second on my machine. With Gunicorn I get 6500 requests per second, much more.

May 2016

A lot has happened; Morepath switched from Werkzeug to WebOb, and Reg got completely refactored. Morepath internals changed a lot too. So it's interesting to run this experiment again.

Morepath still gets about 100 lines of profiler output.

Without profiling: with Waitress I now get about 2700 requests per second on the same machine, so much more. With Gunicorn I get about 7300 requests per second. It's interesting that Waitress got a much bigger boost than Gunicorn.

whatsitdoing-morepath's People

Contributors

faassen avatar

Watchers

Ronny Pfannschmidt avatar  avatar Michael R. Bernstein avatar James Cloos avatar

whatsitdoing-morepath's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.