mirror of
https://github.com/storytold/gridcraft.git
synced 2026-12-02 02:33:55 -06:00
render_pdf memoized picture decodes, but each page a picture overlapped still kept its own RGB copy until the document was written, with no document-wide bound: a 3 KB workbook with one large-extent picture grew ~29 MiB per page and passed 2 GiB in seconds (MAX_PAGES is 2000). PdfDoc now has a document-wide image budget (MAX_DOC_IMAGE_BYTES, 512 MiB) checked before anything is allocated; pictures past it are left out, as oversized ones already are. Cell-picture decodes are memoized too. Complements the write-time dedupe of #818 (#816). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>