Improving Django performance by hinting the Python GC about unreachable cycles

I have recently tried to convince the Python community to add a feature to the Python GC which would accept hints that a certain group of objects is unreachable and can be deallocated. Such a feature would reduce the amount of time spent in full memory scan and improve P99 latency. The actual hints can be provided by developers or Claude Code.

See Improving Python Garbage Collection Performance by Providing Unreachable Cycles Hints - Ideas - Discussions on Python.org for more details.

I need to test this first on a large scale complex Python environment, and Django seems perfect for this. Can anyone from the Django team with me on this? I can code the feature, but I will need a real-life environment to see the actual performance gain. If we can show definite improvement we can use it to push this feature to the Python team.

Whilst not the answer you were after, being Django related.

I would reach out to the Ansible dev team. Ansible is a memory hog that continues to grow the more you do task wise. It’s not uncommon for a play to run 5-10Gb RAM.