mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 14:30:24 +00:00
Map grid: the per-hex render loop called getTerrainFromFile + getIconOverrideFromFile + getGmIconsFromFile, each re-running getAbstractFileByPath + getFileCache — 3 identical cache lookups per hex (~11.5k redundant ops on a 3843-hex map). Fetch frontmatter once and feed three new pure extractors (terrainFromFm/iconOverrideFromFm/gmIconsFromFm). Reuse the bg-image layer across renders (bgLayerEl/bgLayerSrc) so renderGrid()'s viewportEl.empty() no longer re-decodes the image each time. Tag painted hexes with .duckmage-hex-painted (setHexColor) and switch the bg-image empty-hex rule to a class selector instead of a slower :not([style*="background-color"]) attribute-substring match. Table view: memoise the name→entry palette Map per region instead of rebuilding it per row, and re-filter only the rows just filled in each batch (applyFilters(rows?)) instead of re-scanning all rows after every batch. Adds dev/bg-hex-recalc-bench + unit tests for the new pure extractors. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __mocks__ | ||
| fixtures | ||
| helpers | ||
| integration | ||
| asset-hooks.mjs | ||
| frontmatter.test.ts | ||
| hexEditorModal.test.ts | ||
| hexGeometry.test.ts | ||
| mapWithTableExport.test.ts | ||
| overlayPatterns.test.ts | ||
| randomTable.test.ts | ||
| randomTableExport.test.ts | ||
| register.mjs | ||
| sections.test.ts | ||
| singleHexExport.test.ts | ||
| singleNoteExport.test.ts | ||
| token.test.ts | ||
| utils.test.ts | ||
| workflow.test.ts | ||
| workflowExport.test.ts | ||