8000 use of locals() / f_locals() foils pypy · Issue #2454 · python-trio/trio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
use of locals() / f_locals() foils pypy #2454
Closed
@belm0

Description

@belm0

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0