perf: reduce parse node allocations when deserializing primitive types#1964
Merged
Conversation
Member
|
@copilot here is the pull request I want you to use as an example and I forgot to include earlier microsoft/kiota-dotnet#678 |
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix parse node allocations during primitive type deserialization
perf: reduce parse node allocations when deserializing primitive types
Mar 12, 2026
This comment was marked as outdated.
This comment was marked as outdated.
…ormParseNode - Add private getXXXValueFromRaw methods that accept the raw value (not a parse node) - Update public getXXXValue methods to delegate to the new private methods - Update getCollectionOfPrimitiveValues to maintain triage conditions but call private methods directly instead of allocating intermediate parse nodes Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
baywet
approved these changes
Mar 17, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
baywet
reviewed
Apr 15, 2026
This comment was marked as outdated.
This comment was marked as outdated.
…JsonParseNode and FormParseNode Agent-Logs-Url: https://github.com/microsoft/kiota-typescript/sessions/ba493244-ed4c-4f9f-b1e0-c16bb5d5a600
baywet
approved these changes
Apr 15, 2026
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adrian05-ms
reviewed
Apr 15, 2026
Contributor
adrian05-ms
left a comment
There was a problem hiding this comment.
I see some test updates for formParseNode, shouldn't be the same for jsonParseNode
Member
|
@adrian05-ms great catch! Added. |
adrian05-ms
approved these changes
Apr 16, 2026
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.
JsonParseNodeandFormParseNodegetXXXValueFromRawmethods to bothJsonParseNodeandFormParseNodegetXXXValuemethods to delegate to private methodsgetCollectionOfPrimitiveValuesto maintain triage conditions but call private methodsgetBooleanValueFromRawsince it's only used once ingetBooleanValuegetNumberValueFromRawsince it's only used once ingetNumberValueFormParseNode.getCollectionOfPrimitiveValueswith types other than stringgetDateValueFromRawvianew Date(value.getTime())to preserve copy semanticsFormParseNode.getCollectionOfPrimitiveValuestest descriptions to clarify string-only supportprivateclass methods inJsonParseNodeandFormParseNode(reduces per-instance allocations)FormParseNode.getCollectionOfPrimitiveValuesfor future type-parameter supportOriginal prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.