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

use of locals() / f_locals() foils pypy #2454

Open
belm0 opened this issue Oct 26, 2022 · 0 comments · May be fixed by #3112
Open

use of locals() / f_locals() foils pypy #2454

belm0 opened this issue Oct 26, 2022 · 0 comments · May be fixed by #3112

Comments

@belm0
Copy link
Member

belm0 commented Oct 26, 2022

Mutation via locals(), f_locals() causes pypy to abort traces with "force quasi-immut". Trio does this to manage KI protection state, and the most common API calls like current_time() are implicated. So pypy spends a lot of time compiling traces, only to abort them.

some ideas for fixing discussed on gitter starting at https://gitter.im/python-trio/general?at=6357f654cf41c67a5cc9b993

NOTE: a tracing JIT like PyPy is not going to do well anyway with async apps that have a high rate of context switches combined with heterogenous workloads, since the tracing will happen across context switches to other coroutines (which are arbitrarily occurring and arbitrarily ordered).

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 a pull request may close this issue.

1 participant