-
Notifications
You must be signed in to change notification settings - Fork 349
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
High CPU Odata Usage AddWithResize() #3015
Comments
@haledv Thanks for sharing the profiler screenshot. Does this spike occur throughout, over multiple requests, or just during the first request? Do you create a new If you generated your client using OData Connected Service or OData CLI, this should not occur, since they also generate a customer loader. Could you share more details or code snippets of how your If you created a custom Namely, you should override the context.LoadServiceModel =() => GetParsedEdmModel();
context.UseJson(); This setup should happen before the first request is made by the You can parse an |
Hi, thx for the quick reply. It occured while multiple requests where sent at once, which came from a user burst on the facing API. It was created manually without the CLI. Following your advice and the links provided, we cached the Edm Model so no repeated network calls where done and it solved the Problem completely. No more redudant Network Calls and CPU spikes have gone. Thank for the Advice! |
Thanks @haledv for getting back. We should add this to our performance guidelines: MicrosoftDocs/OData-docs#318 |
We are using Odata to query data, and we noticed some high CPU usages when the Api gets hit by some medium traffic.
Assemblies affected
Microsoft.OData.Client" Version="7.20.0"
Microsoft.OData.Extensions.Client" Version="1.0.6"
Actual result
CPU Spikes
Additional detail
I am not sure if we are using the Client somehow wrong or something special, but tracing the application revelead that the cpu is mostly burned here:
If someone has any tips on what to look for when the stack trace looks like that.
The text was updated successfully, but these errors were encountered: