You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When customers create a client using DataServiceContext (without using ODataConnectedService or OData CLI), they usually experience high latencies and CPU usage hikes. This is because, by default, OData Client will fetch the $metadata endpoint and parse the csdl to get the IEdmModel on each request. The solution to this problem is to provide a customer IEdmModel loader delegate. This delegate will be called by OData Client on each request, overriding the default behaviour. To make this call efficient, the customer loader should cache the model to avoid parsing or building the model on each request. This guideline is actually already documented in our guides, but the performance impact is not emphasized, and it's a detail that's easy to miss.
I suggest we add a new section to the performance guidelines documentation that talks about this problem and the solution.
When customers create a client using
DataServiceContext
(without using ODataConnectedService or OData CLI), they usually experience high latencies and CPU usage hikes. This is because, by default, OData Client will fetch the$metadata
endpoint and parse the csdl to get theIEdmModel
on each request. The solution to this problem is to provide a customerIEdmModel
loader delegate. This delegate will be called by OData Client on each request, overriding the default behaviour. To make this call efficient, the customer loader should cache the model to avoid parsing or building the model on each request. This guideline is actually already documented in our guides, but the performance impact is not emphasized, and it's a detail that's easy to miss.I suggest we add a new section to the performance guidelines documentation that talks about this problem and the solution.
Sample customer issue: OData/odata.net#3015
The text was updated successfully, but these errors were encountered: