Files
CLIProxyAPI/internal/runtime/executor
Dmitry R. 7f6d491e70 perf(executor): avoid O(n^2) rebuilds when sanitizing reasoning encrypted_content (#4281)
Previously each dropped encrypted_content re-ran sjson.DeleteBytes on
the whole body/array per item, causing O(n^2) work on inputs with many
reasoning items.

Now the array is walked once, editing only offending items in place
and lazily building a replacement "input" array via strings.Builder.
The builder stays nil (no allocation) when nothing needs sanitizing,
and the array is spliced back with a single SetRawBytes call.
2026-07-14 00:16:05 +08:00
..