server: avoid O(n^2) body accumulation in HTTP listener
Before adoption: this commit came in with the history the project adopted, so no landing records it.
- handleHttpRequest used `body += text` per token, allocating a new backing array on every append (O(n^2) total copy work) - a single ~390 KB POST monopolised the single-threaded server for ~8 s, blocking all other --listen clients - switch to strings.Builder for amortised O(n) Reported with fix by Michal Majchrowicz and Marcin Wyczechowski (AFINE Team).
authored by Junegunn Choi · committed by Junegunn Choi · parent 4b23aa4 · Browse files · 1 file+4 added−3 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+4 added−3 removed
- other:+4 added−3 removed