summaryrefslogtreecommitdiff
path: root/tests/opencode/test-plugin-loading.sh
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2026-02-05 11:38:06 -0800
committerJesse Vincent <jesse@fsck.com>2026-02-05 11:38:06 -0800
commit038abed0261784d8232712cb329774fda1d4ed29 (patch)
tree3b6470a7a067b089f9ff40f705d1111f5c75ccc5 /tests/opencode/test-plugin-loading.sh
parent961052e0f9e5528a2f30a4c1086fdf36e835db9b (diff)
fix: replace O(n^2) escape_for_json with parameter substitution
The character-by-character loop using ${input:$i:1} was O(n^2) in bash due to substring copy overhead. On Windows Git Bash this took 60+ seconds, freezing terminal input even with async hooks. Replaced with bash parameter substitution (${s//old/new}) which runs each pattern as a single C-level pass. 7x faster on macOS, expected to be dramatically faster on Windows Git Bash where the original caused the worst hangs. Relates to #404, #413
Diffstat (limited to 'tests/opencode/test-plugin-loading.sh')
0 files changed, 0 insertions, 0 deletions