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

Investigate EF Core 8 performance issues #1564

Open
AndersAbel opened this issue May 31, 2024 · 3 comments
Open

Investigate EF Core 8 performance issues #1564

AndersAbel opened this issue May 31, 2024 · 3 comments
Assignees

Comments

@AndersAbel
Copy link
Member

EF Core 8 introduced the usage of OpenJSON for SQL Server query generation to improve query plan caching. That turned out to give unexpected performance because of how the SQL Server query engine handles the result of OpenJSON. See
dotnet/efcore#32394 for details.

This has been reported to give performance issues for customers that are using our EF implementations.

Investigate if this has such a high impact that we need to apply any kind of workaround in our implementation.

@luckyboykg
Copy link

luckyboykg commented Jun 24, 2024

I also have a perfromance issue when using Identity Server with .NET 8.
Firstly, I used Identity Server 4 + .NET 6, and everything was OK, but after upgrading to .NET 8, I saw the response time slower. (from ~400ms to ~2s).
My Identity Server even throws crash exceptions 3 times a day. (System out of memory exception)

After that, I upgraded from IS4 to Duende Identity Server 7 + .NET8, but the perfromance issue is still there.
The performance issue was gone when I downgraded to .NET 6 + Duende Identity Server 6.3.

@AndersAbel
Copy link
Member Author

@luckyboykg Do you have any performance metrics that indicates that your issue does indeed relate to the EF core issues? Or have you found something else?

@luckyboykg
Copy link

I can assure you the code base has stayed the same.
Only the .NET and Duende Identity Server versions were downgraded, which fixed my issue.
(.NET 6 + Identity Server 4 or Duende Identity Server 6.3)

I run Identity Server 4 or Duende Identity Server 7 in .NET 8 on Azure App Service, and the API response time generally is still slower, around ~1s-2s.
I can't reproduce this issue from my local side.
This issue only occurs in the Prod environment.

I wonder if this performance issue relates to EF Core 8 or anything else from .NET 8 that is incompatible with the Duende Identity Server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants