Skip to content

[release/9.0-staging] Fix performance degradation in converters because the instance was not reused#36897

Merged
cincuranet merged 1 commit intodotnet:release/9.0-stagingfrom
cincuranet:converter-new-fix-9
Oct 3, 2025
Merged

[release/9.0-staging] Fix performance degradation in converters because the instance was not reused#36897
cincuranet merged 1 commit intodotnet:release/9.0-stagingfrom
cincuranet:converter-new-fix-9

Conversation

@cincuranet
Copy link
Contributor

@cincuranet cincuranet commented Oct 1, 2025

Backport of #36895.

Description

Change to support NativeAOT in EF Core 9 (experimental feature) introduced new code path that resulted in new instances of value converters on primitive collections being recreated on every entity created and hence recompiling the expression on every call.

Customer impact

Significant performance degradation when fetching primitive collections data with value converters from database.

How found

Customer reported.

Regression

Yes, from 8.

Testing

Manual testing.

Risk

Low. Feature flag added.

@cincuranet cincuranet changed the title Fix performance degradation in converters because the instance was not reused [release/9.0-staging] Fix performance degradation in converters because the instance was not reused Oct 1, 2025
@cincuranet cincuranet marked this pull request as ready for review October 2, 2025 08:27
@cincuranet cincuranet requested a review from a team October 2, 2025 08:27
@cincuranet cincuranet requested a review from artl93 October 2, 2025 08:29
@cincuranet cincuranet force-pushed the converter-new-fix-9 branch from 01478a7 to 04099cc Compare October 2, 2025 09:05
@cincuranet
Copy link
Contributor Author

Approved in Tactics via email.

@cincuranet cincuranet merged commit f686ae5 into dotnet:release/9.0-staging Oct 3, 2025
7 checks passed
@cincuranet cincuranet deleted the converter-new-fix-9 branch October 3, 2025 12:35
This was referenced Nov 11, 2025
This was referenced Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant