Zekun Li - There and Back Again: Disable and re-enable garbage collector at Instagram - PyCon 2018

Опубликовано: 07 Ноябрь 2024
на канале: PyCon 2018
2,217
41

Speaker: Zekun Li

Python's cyclic garbage collector wonderfully hides the complexity of memory management from the programmer. But we pay the price in performance. Ever wondered how that works? In this talk, you'll learn how garbage collection is designed in Python, what the tradeoffs are and how Instagram battled copy-on-write memory issues by disabling the garbage collector entirely.

You'll also learn why that isn't such a great idea after all and how we ended up extending the garbage collector API which allowed us to (mostly) re-enable garbage collection. We'll discuss our upstream contributions to the garbage collector that landed in Python 3.6 and 3.7.

This is an in-depth talk about memory management but no prior experience with CPython internals is necessary to follow it.

Slides can be found at: https://speakerdeck.com/pycon2018 and https://github.com/PyCon/2018-slides