Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0] Mitigate JsonObject performance regression. #108014

Merged
merged 2 commits into from
Sep 19, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 19, 2024

Backport of #107944 to release/9.0

/cc @eiriktsarpalis

Customer Impact

  • Customer reported
  • Found internally

In .NET 9 the JsonObject implementation was retargeted to the newly published System.Collections.Generic.OrderedDictionary collection, replacing a bespoke collection implementation. The change left a suboptimal implementation in its indexer, resulting in a ~70% performance regression when constructing new objects.

Regression

  • Yes
  • No

Regressed by #103645.

Testing

Added relevant benchmarks to dotnet/performance.

Risk

Medium. The fix involves using different APIs on the brand new OrderedDictionary type so there is risk that this might surface other undiscovered bugs.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

@eiriktsarpalis eiriktsarpalis added the Servicing-consider Issue for next servicing release review label Sep 19, 2024
@eiriktsarpalis eiriktsarpalis self-assigned this Sep 19, 2024
@eiriktsarpalis eiriktsarpalis added this to the 9.0.0 milestone Sep 19, 2024
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 19, 2024
Copy link
Member

@carlossanlop carlossanlop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in Tactics

@carlossanlop carlossanlop merged commit 31b8a18 into release/9.0 Sep 19, 2024
86 of 90 checks passed
@carlossanlop carlossanlop deleted the backport/pr-107944-to-release/9.0 branch September 19, 2024 18:08
@github-actions github-actions bot locked and limited conversation to collaborators Oct 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.Json Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants