On Tue, Feb 14, 2012 at 9:33 AM, Marin Pranjić <[email protected]> wrote:
> Hi,
>
> I want to compile gluon/* files using Cython and test performance gain
> vs non-compiled code.
> I am using trunk.
>
> There are some issues which I will report here.
> These are not all issues, only those that I think are web2py bugs and
> should be fixed.
I'm playing with cythonizing web2py. I doing against web2py 1.99.4
with cython 0.15.1 in Linux, one file at at time.
I think I gain around 10 req/s more with:
ab -c 10 -n 500 http://127.0.0.1/welcome/default/index
The one that gave me more speed boost was, I think,
cythonizing gluon/template.pyx (I renamed those that I'm cythoninzing)
I did some tweaks here and there, but trivial.... explicit defining some types
and cdef some functions/methods passing function calls to C level.
I found some of the issues you mention but I didn't had time to investigate.
So far I have those cythonized:
contenttype.so
fileutils.so
globals.so
html.so
main.so
newcron.so
restricted.so
storage.so
streamer.so
template.so
If you want to join efforts just mail me.
Side note: for those that want to run web2py in python 3, using Cython
can be a good
alternative to accomplish it.
Ricardo