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> |
||
|---|---|---|
| .. | ||
| export | ||
| hex-map | ||
| hex-table | ||
| random-tables | ||
| bundledIcons.ts | ||
| constants.ts | ||
| defaultHexTemplate.md | ||
| defaultTableTemplate.md | ||
| frontmatter.ts | ||
| HexmakerModal.ts | ||
| HexmakerPlugin.ts | ||
| HexmakerSettingTab.ts | ||
| md.d.ts | ||
| overlayPatterns.ts | ||
| sections.ts | ||
| SetupWizardView.ts | ||
| types.ts | ||
| utils.ts | ||