mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-16 01:35:36 -04:00
ff81a22285
Hoist the HTML-escape lookup table in static/js/ui.js out of the String.replace callback so it is allocated once instead of on every matched character. esc() is the canonical escaper aliased across 27 modules and runs on essentially every render, so this removes a lot of short-lived garbage on the hottest text path. Output is byte-identical (verified across null/undefined/emoji/attribute edge cases). Also build the <select> option lists in cookbook-hwfit.js and group.js by accumulating a string and assigning innerHTML once, instead of `innerHTML +=` inside a forEach (which makes the browser re-parse the element's markup on every iteration). Final DOM is unchanged. Pure micro-optimizations; no behavior change. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>