New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try hosting on PyPy #11

Closed
wants to merge 8 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@simonw
Owner

simonw commented Nov 5, 2017

An experiment to see how hard it is to get my blog working on PyPy. Turns out, not very hard at all.

simonw added some commits Nov 5, 2017

Use psycopg2cffi==2.7.6
Should be compatible with PyPy
Removed django-postgrespool
It was pulling in psycopg2 which can’t build under PyPy
Attempting to bump Heroku to pypy3-5.7.0
Turns out pypy3-5.5.0 is only compatible with Python 3.3 which is not supported by Django 2.0
http://doc.pypy.org/en/latest/index-of-whatsnew.html
@simonw

This comment has been minimized.

Show comment
Hide comment
@simonw

simonw Nov 5, 2017

Owner

Since the tests are all passing, I deployed this branch for a few minutes to see how it would behave. No Sentry errors, but memory usage on Heroku wasn't great compared to regular CPython so I rolled back again:

simonwillisonblog_ _metrics___heroku

Owner

simonw commented Nov 5, 2017

Since the tests are all passing, I deployed this branch for a few minutes to see how it would behave. No Sentry errors, but memory usage on Heroku wasn't great compared to regular CPython so I rolled back again:

simonwillisonblog_ _metrics___heroku

@simonw simonw closed this Nov 5, 2017

@simonw simonw changed the title from Switch to PyPy to Try hosting on PyPy Nov 5, 2017

@simonw

This comment has been minimized.

Show comment
Hide comment
@simonw
Owner

simonw commented Nov 5, 2017

@simonw

This comment has been minimized.

Show comment
Hide comment
@simonw

simonw Nov 5, 2017

Owner

Effect on response time wasn't great either:

banners_and_alerts_and_simonwillisonblog_ _metrics___heroku

Owner

simonw commented Nov 5, 2017

Effect on response time wasn't great either:

banners_and_alerts_and_simonwillisonblog_ _metrics___heroku

@fijal

This comment has been minimized.

Show comment
Hide comment
@fijal

fijal Nov 6, 2017

The response time would eventually stabilize to be ~50% of CPython, but the memory will likely stay higher. Django ORM is insane, I don't know how you can sanely JIT compile it.

fijal commented Nov 6, 2017

The response time would eventually stabilize to be ~50% of CPython, but the memory will likely stay higher. Django ORM is insane, I don't know how you can sanely JIT compile it.

@simonw simonw changed the deployment environment to simonwillisonblog-staging Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment