-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Bad performance while using OData client vs using HttpClient on Android #23185
Comments
Try to use SocketsHttpHandler instead of the default handler. |
Hi @albyrock87 Thank you for your quick reply and your suggestion but I do have the same result. Below the way I configured the handler:
|
I don't believe your issue has to do with the MAUI UI framework. It's either a dotnet runtime issue on Android, or an OData issue. The MAUI UI framework wouldn't affect the underlying connection like that. If you want to verify that, try running that code within a .NET Android app ( @jonathanpeppers Do you know where this should go? |
I can repro this issue at Android API 30 on the latest 17.11.0 Preview 2.1 (8.0.60). |
Again, I don't doubt you have performance issues. The problem is that I don't believe your issue is specific to the MAUI UI project. This repo is for the cross-platform MAUI UI framework, and I think your issue is specific to the dotnet runtime or OData itself running on Android, both of which can't be addressed here. That's why verifying if it fails outside of the MAUI UI framework (Ex. Building a .NET Android app |
If using ^^ Seems like you should file an issue here instead? Doesn't seem like this is a .NET MAUI issue? You could also profile and see exactly what method is responsible for the slowdown: |
Closing based on recommendation here |
Description
I'm in the process to develop an application for my company. This application will connect to OData endpoints.
To achieve my goal, I followed the Microsoft documentation https://learn.microsoft.com/en-us/odata/client/getting-started to connect my project to our OData endpoint.
But, I'm experiencing very bad performance while using the application, even in Release mode.
I've got the idea to use classic HttpClient to compare the performance, and HttpClient is 2x faster than OData client.
Steps to Reproduce
See example :
![image](https://private-user-images.githubusercontent.com/8171300/341830954-d27cea9a-bf5c-44ab-b4a7-e758e5b2c033.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI2NTM2NzQsIm5iZiI6MTcyMjY1MzM3NCwicGF0aCI6Ii84MTcxMzAwLzM0MTgzMDk1NC1kMjdjZWE5YS1iZjVjLTQ0YWItYjRhNy1lNzU4ZTViMmMwMzMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgwMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MDNUMDI0OTM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NGUxY2I3ZGU5NzlmMjhiZWIyOGJhODg0NmYwYTE0NWFhMGJhMDE1NDc2Yzk4ZDNlNzZhMGJjY2QyYjFkOTZlMiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.itvcKPohXt5GQKmi_IovswK8r_FP8ximg_BBEllxeMY)
The behavior is same on physical device.
Link to public reproduction project repository
https://github.com/marcmognol/Maui.OData.PerformanceIssue/
Version with bug
8.0.60 SR6
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
No response
Did you find any workaround?
Yes, by using HttpClient, but proxy generated class with OData generator seems to be easier as we manage thousands of entities.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: