MoNyAvA opened PR #12431 from MoNyAvA:perf/wasi-inherit-env-args to bytecodealliance:main:
WasiCtxBuilder::inherit_envandinherit_argswere doing redundant work: they first collectedstd::env::vars()/std::env::args()into aVec, and thenenvs/argscloned every string again viato_owned().This caused two allocations per environment variable or argument plus an extra temporary vector, without any semantic benefit
MoNyAvA requested wasmtime-wasi-reviewers for a review on PR #12431.
MoNyAvA edited PR #12431:
WasiCtxBuilder::inherit_envandinherit_argswere doing redundant work: they first collectedstd::env::vars()/std::env::args()into aVec, and thenenvs/argscloned every string again viato_owned().This caused two allocations per environment variable or argument plus an extra temporary vector, without any benefit
github-actions[bot] added the label wasi on PR #12431.
alexcrichton submitted PR review:
Thanks!
alexcrichton added PR #12431 perf(wasi): avoid extra allocations in inherit_env/args to the merge queue.
alexcrichton merged PR #12431.
alexcrichton removed PR #12431 perf(wasi): avoid extra allocations in inherit_env/args from the merge queue.
Last updated: Jan 29 2026 at 13:25 UTC