To objectively compare the performance of these OData client libraries, we conducted a benchmarking exercise involving three scenarios:
Simple Add Request: Involving a single entity post-operation.
Simple Delete Request: Involving a single entity delete operation.
Simple GET By Id Request: Involving a single entity read operation by id.
Simple GET All Request: Involving an all entities read operation.
OS Windows 10
Intel i7-9750H, CPU 2.60 GHz, 1CPU, 12 logical and 6 physical core
.Net 8.0.101 SDK
|Custom Http Client
The results indicated that ODataClient exhibited a slight performance advantage over Simple OData Client, while custom HttpClient consistently outperformed both libraries. This difference in performance is attributed to the optimization capabilities of custom HttpClient, which allow for fine-tuning of HTTP requests and responses.
The choice between ODataClient, custom HttpClient, and Simple OData Client hinges on the specific requirements of the project. For straightforward OData interactions and a focus on data manipulation, ODataClient provides a balanced combination of ease of use and performance. In cases demanding granular control over HTTP communication and performance optimization, custom HttpClient emerges as the preferred choice. For beginners or those prioritizing simplicity, Simple OData Client offers a lightweight and approachable entry point into the world of OData development.