MosswartOverlord/static
Erik 69678a9426 perf(v2): 8 optimizations — 24% smaller bundle, fewer re-renders
1. React.memo on WindowRenderer — prevents re-renders when parent
   state changes but no windows are affected

2. Coordinate display via direct DOM ref — no React state updates
   on mouse move (was triggering re-renders on every pixel)

3. useDeferredValue for sidebar vitals + player list — React
   prioritizes map interactions over stat text updates

4. Chat messages in ref — stores in useRef instead of useState,
   only bumps a version counter for re-render. Eliminates a
   new Map() allocation on every chat message.

5. Lazy-load 8 window components — InventoryWindow, CharacterWindow,
   RadarWindow, CombatStatsWindow, IssuesWindow, VitalSharingWindow,
   StatsWindow, CombatPickerWindow all loaded on first open.
   Main bundle dropped from 278KB to 211KB (24% reduction).

6. Preload critical assets — dereth.png, backpack icon, dungeon_tiles.json
   via <link rel="preload"> in index.html for instant map render.

7. Bundle splitting — React runtime extracted to separate 12KB chunk
   (cached independently). Window components split into 8 chunks.
   Total: 13 chunks vs previous 2.

8. Service worker — caches map images, icon sprites, and dungeon tiles.
   Icon images cached on first fetch. Repeat page loads serve from
   cache instantly. Auto-cleans old cache versions.

Net result:
- Initial load: 211KB main + 17KB CSS (was 278KB + 17KB)
- React cached separately: 12KB
- Windows load on demand: 1-15KB each
- Dashboard with Recharts: 425KB (unchanged, still lazy)
- Map images/icons: cached by service worker after first load

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 12:11:08 +02:00
..
icons added inventory, updated DB 2025-06-10 19:21:21 +00:00
v2 perf(v2): 8 optimizations — 24% smaller bundle, fewer re-renders 2026-04-14 12:11:08 +02:00
acmap.png feat: switch to UtilityBelt's acmap.png (2048x2048) 2026-04-08 12:43:22 +02:00
admin.html feat: add app-level authentication with login, session cookies, and admin panel 2026-04-10 19:45:08 +02:00
debug.html Debug and inventory 2025-06-19 17:46:19 +00:00
dereth.png Overlord sees all 2025-04-29 22:23:34 +00:00
dereth_highres.png feat: swap map to high-res color-corrected Dereth map 2026-04-08 12:41:47 +02:00
dungeon_tiles.json fix: detect PNG vs BMP format in dungeon tiles 2026-04-08 15:18:09 +02:00
favicon.ico added favicon 2025-05-09 23:31:01 +00:00
index.html feat: combat stats backend + frontend (Mag-Tools style) 2026-04-12 09:42:11 +02:00
inventory.html feat: move column toggles into table headers 2026-04-09 10:12:01 +02:00
inventory.js feat: compute base item values by reversing active spell buffs 2026-04-09 12:31:39 +02:00
login.html Fix login page: allow /icons/ through auth middleware, match color scheme to AC logo 2026-04-10 20:07:06 +02:00
prismatic-taper-icon.png Major overhaul of db -> hypertable conversion, updated GUI, added inventory 2025-06-08 20:51:06 +00:00
script.js fix(combat): show offense + defense damage by element in grid 2026-04-12 10:13:47 +02:00
style-ac.css Extract createWindow helper to deduplicate window setup code 2026-02-26 09:26:06 +00:00
style.css feat: combat stats backend + frontend (Mag-Tools style) 2026-04-12 09:42:11 +02:00
suitbuilder.css Add suitbuilder UI improvements for locked slots and suit summary 2026-02-05 19:11:37 +00:00
suitbuilder.html feat: add Healing and Summoning cantrip constraints to suitbuilder 2026-03-07 20:57:11 +00:00
suitbuilder.js feat: add Healing and Summoning cantrip constraints to suitbuilder 2026-03-07 20:57:11 +00:00