Repository navigation
Conversation
|
@jhonDoe15 is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Summary
Candidate 16.x backport of #4919, targeting the next appropriate 16.x release if maintainers accept the allocation tradeoff. The original v17 PR is still under review; this draft preserves a separately validated backport without implying prior approval.
Ports the two result-map allocations to
execution/execute.tsandjsutils/promiseForObject.ts. Results stay fresh, mutable and null-prototype. The regression tests are adapted to 16.x's Mocha/formatting conventions. No version bump, Node requirement, public API or dependency change. Four files, +85/-2 lines.Evidence
Actual npm builds against
6944e23, Linux/WSL2, Node 20.19.5; five fresh paired 100 MB dense-response trials with identical bytes/hash:Idle heap is approximately 6.2 MB and input-ready heap 211.9 MB on both sides. Input stays live; heap checkpoints are not continuous peaks, and RSS includes startup. All five pairs improve the tabled metrics. The promise-heavy 3 MB case saves only 14.09% added heap.
Limits: wide Node objects have essentially no retained-output memory saving, and Bun 1.2.18 has no consistent substantial memory benefit. The initial 100-field Node case is 9.03% slower overall; a separate larger five-pair confirmation is 0.13% slower. Bun's 32/100-field cases are 5.10%/6.44% slower overall. These regressions and timing variability remain relevant to stable-release acceptance.
Validation: 2,014 tests pass on both Node 12.22.12 and 20.19.5; lint, types, full formatting, spelling, npm/Deno builds and fuzz tests pass. Built CommonJS/ESM result-map checks pass on both runtimes. TypeScript and Webpack integration projects pass; the Node-container project is blocked by unavailable Docker, while its test program passes directly on both runtimes. c8 produces an empty report on both base and candidate, so coverage is not claimed. The full CI runtime/container matrix remains outstanding.
Reproduction scripts, paired raw results and validation logs remain outside this PR's diff.
Merge Danger
Door: two-way.
Blast Radius: execution.
No intended observable result change. The optimization depends on engine object layout and result shape. Please assess the approach in #4919 and the 16.x-specific evidence before accepting it for the stable line; maintainers control release timing and version.