mirror of
https://github.com/storytold/gridcraft.git
synced 2026-11-09 12:00:01 -06:00
data.getData and data.fromTextCsv built every row densely before writing it: JSON records were padded to the union of all keys (found with a quadratic Vec::contains scan), and CSV cells were expanded over the whole used rectangle. A few sparse records or one far-away CSV cell therefore allocated billions of slots. The importer now collects JSON keys with a HashSet, refuses more keys than a sheet has columns, and checks the projected rows x columns against MAX_IMPORT_CELLS (10,000,000) before building any row.