I'd also add that it's debatable whether using gunicorn's 'jsonify' is any
better than json.dumps(). They had to add a shim in to make jsonify work.
jsonify adds the correct header for json, whereas json.dumps doesn't. I'd
expect the database performance to take a hit in this setup because of
their shim, but not by much.
On Friday, April 5, 2013 12:41:47 PM UTC-7, Derek wrote:
I've said in the past that they were unfair to Ruby because they were
using their ruby server in dev mode which recompiles code on every access.
This time, I looked more closely at their 'Flask' setup. They are running
Flask via gunicorn, so you'd think all is good. However, they aren't
setting the 'worker type'. That means it's the default worker type, which
is 'sync'. In other words, it's the same as vanilla python. They should
have set it up with 'gevent' or 'eventlet'. And what do you know, they are
running it in development mode as well. Flag 'preload' needs to be True in
order for it to not recompile on every access.
So, their setup as it is now, can handle exactly 8 requests at once, and
it recompiles code at every run. No wonder it's slow. Nobody in their right
mind would deploy their app that way.
With my changed setup, they could handle theoretically 8000 requests at
once, and it does not recompile at every run.
I've submitted a 'pull request'.
On Friday, April 5, 2013 11:43:42 AM UTC-7, David Marko wrote:
http://www.techempower.com/blog/2013/04/05/frameworks-round-2/
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.