fix: performance issue with enum parsing during deserialization#670
Merged
Conversation
This was referenced Mar 10, 2026
Closed
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
cc5d273 to
4ff0582
Compare
adrian05-ms
previously approved these changes
Mar 11, 2026
* fix: avoid multiple strings allocations when deserializing flag enums Signed-off-by: Vincent Biret <vibiret@microsoft.com> * fix: avoid assigning parse nodes for collections of primitive values in json Signed-off-by: Vincent Biret <vibiret@microsoft.com> * fix: avoid allocation of parse nodes in form deserialization of collections Signed-off-by: Vincent Biret <vibiret@microsoft.com> * fix: further reduction of node assignments in cases where it's not necessary Signed-off-by: Vincent Biret <vibiret@microsoft.com> * fix: cleaner branching in loops to reduce padding Signed-off-by: Vincent Biret <vibiret@microsoft.com> --------- Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Member
Author
|
@copilot the code coverage is low for the following methods, add some unit tests FormParseNode -> GetCollectionOfPrimitiveValues JsonParseNode -> GetScalarValue (Bool, Byte, SByte, ByteArray) |
Contributor
…lection methods (#684) * Initial plan * test: add missing unit tests for FormParseNode and JsonParseNode methods - Add long? support to FormParseNode.GetCollectionOfPrimitiveValues - Add private GetLongValue(string) helper to FormParseNode - Add GetCollectionOfLongPrimitiveValuesFromForm test - Add GetCollectionOfDateTimeOffsetPrimitiveValuesFromForm test - Add GetCollectionOfDatePrimitiveValuesFromForm test - Add JsonParseNode scalar tests: GetBoolValue, GetByteValue, GetSbyteValue, GetByteArrayValue - Add JsonParseNode GetCollectionOfEnumValues tests - Add JsonParseNode GetCollectionOfPrimitiveValues tests for bool?, byte?, sbyte?" Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> * test: rename GetByteArrayValue test method to better reflect its intent Co-authored-by: baywet <7905502+baywet@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
adrian05-ms
approved these changes
Mar 19, 2026
This was referenced Mar 29, 2026
This was referenced Apr 6, 2026
This was referenced Apr 13, 2026
This was referenced Apr 29, 2026
This was referenced May 7, 2026
Open
github-actions Bot
pushed a commit
to EelcoLos/nx-tinkering
that referenced
this pull request
May 12, 2026
Updated [Microsoft.Kiota.Abstractions](https://github.com/microsoft/kiota-dotnet) from 1.22.0 to 1.22.2. <details> <summary>Release notes</summary> _Sourced from [Microsoft.Kiota.Abstractions's releases](https://github.com/microsoft/kiota-dotnet/releases)._ ## 1.22.2 ## [1.22.2](microsoft/kiota-dotnet@v1.22.1...v1.22.2) (2026-05-05) ### Bug Fixes * Set CLSCompliant attribute where possible ([#705](microsoft/kiota-dotnet#705)) ([f6c21e4](microsoft/kiota-dotnet@f6c21e4)) ## 1.22.1 ## [1.22.1](microsoft/kiota-dotnet@v1.22.0...v1.22.1) (2026-03-19) ### Bug Fixes * adds missing parentheses in pattern matching ([#671](microsoft/kiota-dotnet#671)) ([50d535e](microsoft/kiota-dotnet@50d535e)) * performance issue with enum parsing during deserialization ([#670](microsoft/kiota-dotnet#670)) ([3a09234](microsoft/kiota-dotnet@3a09234)) Commits viewable in [compare view](microsoft/kiota-dotnet@v1.22.0...v1.22.2). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Eelco Los <5102501+EelcoLos@users.noreply.github.com>
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.
partial #632