]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-139951: Fix major GC performance regression (GH-140262)
authorMark Shannon <mark@hotpy.org>
Tue, 21 Oct 2025 14:22:15 +0000 (15:22 +0100)
committerGitHub <noreply@github.com>
Tue, 21 Oct 2025 14:22:15 +0000 (15:22 +0100)
commit0c01090ad957de4625f504ce4f29df0a05d09fba
tree380f28d916feaed8f5a32de686fd1c4b83b5b53d
parent4adf08ae463e8b5311c5a7662ab26f8d0d14381d
GH-139951: Fix major GC performance regression (GH-140262)

* Count number of actually tracked objects, instead of trackable objects. This ensures that untracking tuples has the desired effect of reducing GC overhead

* Do not track most untrackable tuples during creation. This prevents large numbers of small tuples causing execessive GCs.
Include/internal/pycore_gc.h
Lib/test/test_gc.py
Misc/NEWS.d/next/Core_and_Builtins/2025-10-17-18-03-12.gh-issue-139951.IdwM2O.rst [new file with mode: 0644]
Objects/tupleobject.c
Python/gc.c