sbuffkin_hexmaker/dev
isaprettycoolguy@protonmail.com b69131f16d perf: cut redundant per-item work on map + table load
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>
2026-06-30 07:03:23 -04:00
..
.gitignore feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
bg-hex-alignment-sandbox.html fix: grid expand/shrink preserves bg image alignment (1.4.1) 2026-06-17 18:18:53 -04:00
bg-hex-recalc-bench.html perf: cut redundant per-item work on map + table load 2026-06-30 07:03:23 -04:00
bg-hex-recalc-bench.mjs perf: cut redundant per-item work on map + table load 2026-06-30 07:03:23 -04:00
calibration-outline-overlay-sandbox.html feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
coord-label-thrash-bench.html fix: eliminate O(n²) layout thrash in renderCoordLabelsLayer (open-time stall) 2026-06-30 06:57:16 -04:00
coord-label-thrash-bench.mjs fix: eliminate O(n²) layout thrash in renderCoordLabelsLayer (open-time stall) 2026-06-30 06:57:16 -04:00
coord-slip-sandbox.html fix: coord labels no longer slip up-left during zoom bake 2026-06-21 11:09:12 -04:00
hex-calibration-sandbox.html feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
screenshot-approaches.mjs feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
snapshot-bg-hex-alignment.mjs fix: grid expand/shrink preserves bg image alignment (1.4.1) 2026-06-17 18:18:53 -04:00
snapshot-calibration-outline.mjs feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
snapshot-coord-slip.mjs fix: coord labels no longer slip up-left during zoom bake 2026-06-21 11:09:12 -04:00