mirror of
https://github.com/sbuffkin/hexmaker.git
synced 2026-07-22 06:14:01 +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> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| bg-hex-alignment-sandbox.html | ||
| bg-hex-recalc-bench.html | ||
| bg-hex-recalc-bench.mjs | ||
| calibration-outline-overlay-sandbox.html | ||
| coord-label-thrash-bench.html | ||
| coord-label-thrash-bench.mjs | ||
| coord-slip-sandbox.html | ||
| hex-calibration-sandbox.html | ||
| screenshot-approaches.mjs | ||
| snapshot-bg-hex-alignment.mjs | ||
| snapshot-calibration-outline.mjs | ||
| snapshot-coord-slip.mjs | ||