-
Notifications
You must be signed in to change notification settings - Fork 476
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
ODataController performance is very slow #2644
Comments
Thanks @andrew-vdb for reporting the issue. To help with troubleshooting the issue,
Something to note is that Asp.Net Core OData does a little more that the vanilla Asp.Net Core does. The objects are not serialized arbitrarily. Quite a bit of validation logic is applied. However, that shouldn't result into a huge performance hit. We encourage you to share a much information as possible for your scenario to help identify what might be the root cause of the observed behaviour |
k6 is stress test tool, see https://k6.io/
3,4
|
@andrew-vdb When you use |
@andrew-vdb are you using the 7.5.x version of WebAPI or 8.x? |
@habbes I used version 8.x It is difficult to produce visual studio profiler report, it is barely working.... Just curious, why do we need to do fancy thing during serialization? |
@andrew-vdb thanks for the additional context. And did you also try with OData serialization does extra work to validate the payload, adding annotations that allow clients to consume the OData payload in predictable and unambiguous ways. However, there are ongoing efforts to improve serialization performance. |
@andrew-vdb Is |
@habbes yes, the code is from this repo
|
@andrew-vdb, could you please tell if this was resolved anyhow in newer versions of OData? Or how have you managed to overcome performance issues? I am debating whether or not to use OData in my projects and it looks like neither async execution is supported out of the box nor the performance is great. |
@kerajel even Microsoft is not using OData and will go to GraphQl (check their latest project, its only support REST and GraphQl) Stay away from this if you jump to something new |
Have same problem of slow performance with Odata. Any update? |
@rsgilbert Could you create a new issue with details about the specific performance issues you are facing, with some profiler or benchmark results where possible that could help us narrow down the issue. We added support to IAsyncEnumerable which makes serializing async data sources more efficiently (no need to load the entire dataset in memory), we made some optimizations to the serializer. We'll share a guide soon for performance improvement tips to help you address common performance issues related to OData libraries. |
When I use $top 100, within 1 minute there are only 213 requests served
It is so slow that its not something we can accept
Do we have any performance target?
Same query with ApiController + ADO.net and produce same result is much much faster
Assemblies affected
Reproduce steps
Create any OData endpoint, do k6 with --vus 250 --duration 3m
Compare it with Ado.net request
Expected result
Acceptable performance level
Actual result
Very slow
Additional detail
I did check the issues in github, is the performance with serialization still not fixed?
The text was updated successfully, but these errors were encountered: