From cb33a4c5ccd565b31420f1655122ef0aaba54dc1 Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Thu, 13 Aug 2026 09:04:10 +0200 Subject: [PATCH] perf(coverage): escape the HTML report once per file, not twice per line An HTML report over this repo took 58.7s for 128 files. Almost all of it was one line: every source line was escaped through a command substitution AND a sed, about 22,000 processes for ~11,000 lines. It is 9.5s now, byte-identical output over a fixed corpus. The escaping stays out of Bash on purpose. Bash 5.2 made a bare & in a substitution REPLACEMENT mean the matched text, so ${line// EOF - echo " $(basename "$display_file") | Coverage Report" + echo " ${display_file##*/} | Coverage Report" cat <<'EOF'