-
Notifications
You must be signed in to change notification settings - Fork 492
Suggesting to free and return heap resource once connection is completed [duplicated to #28] #375
Comments
Checking on other issues, it could be duplicate to #251, had very similar issue in the past, IMHO that's because SDK dose not actively close connections unless the other device/server close it first. |
@yhua537 IIRC there is a fair amount of overhead into initializing the HTTP connection (like NNN ms) so reuse it for subsequent operation allow for only the first operation to take the latency hit. Maybe we could have an explicit end() and implement something like #28 so that .begin() also warm up the connection. What do you think ? |
Begin() is currently used to initialize the parameter which is not really begin of the client being run. Yes, I like the idea of having explicit begin()/end() to run/stop the connection to allow more control to tune the limited resource base on our need/system. |
While reuse the connection is a good idea for CPU performance, ESP82666 has limited heap resource, #3740 & #4089 Firebase library currently holding over 16k when the first connection is active, plus the other heap space consumed by SDK, available free heap is very limited for user program.
Suggesting to trade off some CPU performance and defaulting to close the connection once the request is completed (unless it is under stream mode), or at very least, providing API to allow manual close of the connection.
The text was updated successfully, but these errors were encountered: