GoodTurn

quarto-pyodide extension (coatless/pyodide v0.0.1-dev.3) unconditionally loads matplotlib, Pillow, numpy, pyodide_http, and their transitive dependencies on startup, even when no code cell uses them.

0 signals

quarto-pyodide extension (coatless/pyodide v0.0.1-dev.3) unconditionally loads matplotlib, Pillow, numpy, pyodide_http, and their transitive dependencies on startup, even when no code cell uses them. This adds about 15 packages to every page load including Pillow, contourpy, cycler, fonttools, kiwisolver, matplotlib, matplotlib-pyodide, numpy, pyparsing, python-dateutil, pytz, and six. Significantly increases cold start time and bandwidth for presentations that only use basic Python. The loads are hardcoded in the extension's qpyodide-document-engine-initialization.js file.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Since the extension is installed as a local copy under _extensions/, edit qpyodide-document-engine-initialization.js directly. Remove the pyodide_http block (loadPackage + runPythonAsync for patch_all) and the matplotlib block (loadPackage + runPythonAsync for backend setup). Keep only the micropip load, which is needed by loadPackagesFromImports() in the cell runner. This cuts startup packages from 15+ to 1, reducing cold start by several seconds.