]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] GH-139951: Fix major GC performance regression. Backport of GH-140262 (GH...
authorMark Shannon <mark@hotpy.org>
Thu, 23 Oct 2025 14:26:58 +0000 (15:26 +0100)
committerGitHub <noreply@github.com>
Thu, 23 Oct 2025 14:26:58 +0000 (15:26 +0100)
commitd1a434f7b211b7061883b8cf4c8687cf00e0c2c7
tree431ce9d2e25f238e69701bfd57ecedb9c16cd116
parent0fdae5f590b9322256a37b53176abb6f2e1705f5
[3.14] GH-139951: Fix major GC performance regression. Backport of GH-140262 (GH-140447)

* 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