From ff81a2228518ad12c3b99f5ab646242d3ce580f0 Mon Sep 17 00:00:00 2001 From: "chrisdvz.io" Date: Mon, 1 Jun 2026 07:09:33 +0300 Subject: [PATCH] perf(ui): hoist esc() lookup table and build option lists once (#160) 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