Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drawbacks to running Django under PyPy? [closed]

I understand that Django, PyPy, and Psycopg2 all work correctly together, and speed.pypy.org claims great performance improvements over CPython. Are there any downsides?

like image 567
jl6 Avatar asked May 02 '13 08:05

jl6


People also ask

Does Django work with PyPy?

Running Django on ​ PyPy boils down to installing both and running Django with pypy instead of python . Download a ​ PyPy binary from ​http://pypy.org/download.html and follow the install instructions there. ​ PyPy ​runs the templating engine faster than CPython, but so far DB access is slower for some drivers.

Why is Django so slow?

Django sites can be slow if you use the convenience naively. If a Django application is noticeably slow it is almost always inefficient use of the ORM, which can be fixed in an afternoon with a profile or debug toolbar. If it is okayish but not fast then it is usually because of a lack of cache strategy.


1 Answers

  1. Library support. Not all libraries are compatible with PyPy.

    Your best bet is to actually try running pypy manage.py test and see if it breaks. Then you know which dependencies need to be brought into line.

    http://reinout.vanrees.org/weblog/2011/06/06/django-and-pypy.html

  2. Webservers

    You can't use pypy with Apache. You need to use a pure-python webserver + nginx. You MAY get it working on uwsgi.

like image 82
Thomas Avatar answered Oct 11 '22 22:10

Thomas