Repository navigation
[Fusion] Fix redundant copying of typed input lists - #10605
Draft
tobias-tengler wants to merge 3 commits into
Draft
tobias-tengler wants to merge 3 commits into
tobias-tengler wants to merge 3 commits into
Conversation
Contributor
Patch coverage100.0% of changed lines covered (22/22)
Project coverage: 59.0% (311546/527834 lines) |
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.
Ordinary successful warm mutations with typed list variables validate items into temporary storage, then copy them into the final owned array. This repeats a copy and pooled-buffer bookkeeping even though the JSON array length is already known.
This PR fills the final owned array directly while preserving item validation order, first-error paths, nested lists and scalar-to-list fallback. Empty lists retain shared empty storage, and request values remain independently owned.
mainmainmainmainmainmainmainmainmainThe complete production variable-coercion helper, including UTF8 output consumption and owned-output escape, improved 10.8–13.8% for the ordinary one/three-item cases, meeting the localized 5% gate; five items are a derived catalog control. Means include all 360 observations and 36 native MemoryDiagnoser rows from two independent launches per arm (BDN 0.15.8, Release .NET 10.0.12, ARM64, server GC, two CPUs).
mainis284f0b5f44cf, measured sourcec66f6ae4f182, and published source9f0dee621aebuses equivalent declaration syntax with identical .NET 10 method bodies; Debug .NET 11 style validation and 34 Release tests passed. Successful allocation is unchanged. The error control adds 48 B (1.9%) for its abandoned three-slot array. Scalar/singleton controls also run faster; no control adjustment or observations were removed. This measures CPU-bound helper elapsed time, not whole-gateway performance.