Skip to content
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

Experimental PyPy version of Caluma #518

Closed
wants to merge 1 commit into from

Conversation

winged
Copy link
Contributor

@winged winged commented Jun 21, 2019

This uses a separate Dockerfile, so users will still have the choice

This uses a separate Dockerfile, so users will still have the choice

Also we need to use a different psycopg2 implementation, as the cPython
version doesn't work with pypy
@winged
Copy link
Contributor Author

winged commented Jun 21, 2019

The plan also is to add this as a different tag to Dockerhub, so switching between python implementations becomes easy

@sliverc
Copy link
Member

sliverc commented Jul 19, 2019

@winged
Not sure this is a good idea. Just simply adding a pypy docker file doesn't really add pypy support. We would need to adjust CI to run the tests with pypy as well where some code could break as well. Also the docker file is a copy of the Dockerfile which means in the future several dockers files need to be adjusted - or worse they could get out of sync.

All in all I do not see how supporting pypy brings any advantage to a caluma user as the app runs in a docker container. Or what do you see the advantages are?

@rhizoome
Copy link

TLDR: It depends.

@sliverc well, it is supporting a fellow open-source project more or less. They have done an awesome job ensuring cpython compatibility. I am currently trying to get pypy tested/supported on musl, just because both projects musl-libc and pypy are awesome.

I agree that this might cause additional time and effort for caluma-maintainers and caluma won't profit from pypy as long as it isn't on heavy load (JIT) or under memory pressure (pypy has more efficient memory-representation of data-structures). Also coverage-py is very slow on pypy, because it is built for cpython, so CI-cycles will slow-down.

@sliverc
Copy link
Member

sliverc commented Jul 26, 2019

maybe this better happen outside of caluma repository to experiment with PyPy and Caluma and see whether it actually brings some performance improvement in certain situations. If it works out well we can always consider to integrate it into the main repo even replacing CPython as default if the experiment shows massive performance improvements without major drawbacks.

Simply supporting PyPy in the main repo just for the sake of supporting it I wouldn't do as it increases CI run time and maintenance.

@open-dynaMIX
Copy link
Member

First benchmarks by @winged surprisingly show that with cpython caluma is about 3-4 times faster.

I don't know if he further investigated why that is the case.

@rhizoome
Copy link

For me pypy is a little faster running pytest, but psycopg2cffi chtd/psycopg2cffi#106 isn't well maintained.

Pypy:

real    3m45.620s
user    2m48.987s
sys     0m37.897s

CPython:

real    4m5.379s
user    3m1.226s
sys     0m44.560s

@winged winged closed this Aug 17, 2020
@winged winged deleted the caluma_pypy branch August 17, 2020 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants