3 ms·
Did you ever attempt to use PyPy? Flask works with it, and in my experience the handful of times I've needed Python to be more performant, PyPy got me there ea
by chucky_z 9y ago
Did you ever attempt to use PyPy? Flask works with it, and in my experience the handful of times I've needed Python to be more performant, PyPy got me there easily.
My use-case was I was doing a heavy part of an ETL pipeline out of MySQL and it was taking an unreasonable amount of time. PyPy was a roughly ~8x speedup, which ended up being faster than doing direct manipulation with MySQL via the cli (!!!).
- oneweekwonder 9y agoFor interest sake, can SQLAlchemy run on PyPy; pgsql driver support? thanks,
- sirn 9y agoSQLAlchemy can run on PyPy, but you have to use pg8000 (pure Python) or psycopg2cffi (cffi port) instead of psycopg2 for pg.
- fermigier 9y agoI haven't used it in production (only made some benchmarks), but the recommended approach is to use the pg8000 driver (https://github.com/mfenniak/pg8000 https://github.com/mfenniak/pg8000) with pypy, instead of psycopg.
- zzzeek 9y agouse psycopg2cffi: https://pypi.org/project/psycopg2cffi/ https://pypi.org/project/psycopg2cffi/