summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorSam Gross <colesbury@gmail.com>2024-02-01 09:26:23 (GMT)
committerGitHub <noreply@github.com>2024-02-01 09:26:23 (GMT)
commite6d6d5dcc00af50446761b0c4d20bd6e92380135 (patch)
tree77832c15b67d591317682f916839c78a7f10b0d8 /Python/import.c
parent5ce193e65a7e6f239337a8c5305895cf8a4d2726 (diff)
downloadcpython-e6d6d5dcc00af50446761b0c4d20bd6e92380135.zip
cpython-e6d6d5dcc00af50446761b0c4d20bd6e92380135.tar.gz
cpython-e6d6d5dcc00af50446761b0c4d20bd6e92380135.tar.bz2
gh-114746: Avoid quadratic behavior in free-threaded GC (GH-114817)
The free-threaded build's GC implementation is non-generational, but was scheduled as if it were collecting a young generation leading to quadratic behavior. This increases the minimum threshold and scales it to the number of live objects as we do for the old generation in the default build. Note that the scheduling is still not thread-safe without the GIL. Those changes will come in later PRs. A few tests, like "test_sneaky_frame_object" rely on prompt scheduling of the GC. For now, to keep that test passing, we disable the scaled threshold after calls like `gc.set_threshold(1, 0, 0)`.
Diffstat (limited to 'Python/import.c')
0 files changed, 0 insertions, 0 deletions