-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Increase the idleTimeout to 15 seconds to enhance API response time. #2046
Comments
Which |
inside the io_adapter HttpClient _createHttpClient() { |
In the code you referenced, you can always specify the |
"This is the code from Dio's repository located at "lib/src/adapters/io_adapter.dart". It was initially written as: I changed it to: Because of that, I have improved my API response time. So, why didn't the Dio team make this change?" |
Improvements are related to use cases. Your use case might fit the 15 seconds idle timeout perfectly, others might not. Generally, changing such configuration will break users code, no one want that happen. Also, as I stated above #2046 (comment), there is no need for you to change the source code. Instead, set the Closing as we've already provide such ability. |
Request Statement
I want to improve the response time of my API call. When I hit an API using Postman, it takes only 80ms, but the same API takes 250ms in Flutter Dio. Some people suggested me to increase idleTimeout to 15 seconds to improve API response time. I have changed idleTimeout from 3 seconds to 15 seconds, and it actually improves the API response time. So, does it cause any problems to increase idleTimeout to 15 seconds?
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: