perf(engine): pass process arguments as arrays - #15709
Open
rgrinberg wants to merge 1 commit into
Open
Conversation
rgrinberg
force-pushed
the
push-wzlznyorsmov
branch
4 times, most recently
from
August 8, 2026 21:25
c6fb2f9 to
976d67e
Compare
rgrinberg
force-pushed
the
push-wzlznyorsmov
branch
5 times, most recently
from
August 9, 2026 12:40
e13ce15 to
0a110c3
Compare
Flatten expanded action arguments directly into an immutable array and use arrays as the canonical representation throughout process execution. Existing list-based Process entry points convert at their boundary, while command rendering converts only when needed. Trace events consume arrays directly without changing the serialized format, and process runner requests retain arrays across marshalling. Spawn accepts the executable, argv[0], and the remaining immutable argument array separately. This preserves caller control over argv[0] while letting the Unix stub construct the C argument vector without materializing either an OCaml argument list or a second full argv array. Across six alternating cold @check build pairs with eight jobs and the cache disabled, median minor allocation fell from 295.99M to 295.57M words (-0.14%), promoted allocation fell from 45.30M to 44.34M words (-2.12%), and major allocation fell from 102.13M to 101.27M words (-0.84%). In a separate six-pair --action-runner comparison, retaining arrays in runner requests saved another 0.42M parent-process minor words. Runtime measurements remained noisy. Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
rgrinberg
force-pushed
the
push-wzlznyorsmov
branch
from
August 9, 2026 12:47
0a110c3 to
caaebcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Expanded action arguments are currently flattened into a list, retaining one list cell per argument while the subprocess runs and allocating a temporary reversed list during flattening.
Flatten action arguments directly into an immutable array and use arrays as the canonical representation in the process core. Existing list-based
Processentry points convert at their boundary, while command rendering converts only when needed. Trace events consume arrays directly without changing the serialized format, and process runner requests retain arrays across marshalling.Spawn.spawnaccepts the executable,argv[0], and the remaining immutable argument array separately. This preserves caller control overargv[0]while allowing the Unix stub to construct the C argument vector without first materializing either an OCaml argument list or a second fullargvarray.Across six alternating cold
@checkbuild pairs with eight jobs and the cache disabled, median minor allocation fell from 295.99M to 295.57M words (-0.14%), promoted allocation fell from 45.30M to 44.34M words (-2.12%), and major allocation fell from 102.13M to 101.27M words (-0.84%). In a separate six-pair--action-runnercomparison, retaining arrays in runner requests saved another 0.42M parent-process minor words. Runtime measurements remained noisy.