]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] gh-142531: Fix free-threaded GC performance regression (gh-142562) (gh-142617)
authorNeil Schemenauer <nas-github@arctrix.com>
Fri, 12 Dec 2025 22:30:20 +0000 (14:30 -0800)
committerGitHub <noreply@github.com>
Fri, 12 Dec 2025 22:30:20 +0000 (14:30 -0800)
commit27f27a68b35e5650c350b83c347d43e8b794422f
tree764f0cad6c7a91dec35687b731c2bd174ed508b9
parente01407683e5942ea8cf6b8c0fb54229b9e94a90a
[3.14] gh-142531: Fix free-threaded GC performance regression (gh-142562) (gh-142617)

If there are many untracked tuples, the GC will run too often, resulting
in poor performance.  The fix is to include untracked tuples in the
"long lived" object count. The number of frozen objects is also now
included since the free-threaded GC must scan those too.
(cherry picked from commit e38967ed60778146050cc88dd16b70bfd867fde7)
Lib/test/test_gc.py
Misc/NEWS.d/next/Core_and_Builtins/2025-12-10-23-03-10.gh-issue-142531.NUEa1T.rst [new file with mode: 0644]
Modules/_testinternalcapi.c
Python/gc_free_threading.c