ClearOutputPreprocessor vs AsyncIO Server Mode for Mitigating Jupyter Notebook Memory Leak
Goal: Keep RSS stable when repeatedly executing cells that produce large outputs (e.g., 10 MB images) in a live Jupyter Notebook session without restarting the kernel. Constraint: The nbconvert ClearOutputPreprocessor only removes output metadata when the notebook is saved, while enabling Jupyter Server’s asyncio‑based tornado loop alters thread‑local storag