-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WIFI HTTP download file speed is slow #9822
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
Comments
What happens if you read 1KB at a time, instead of 100KB? |
The rate of reading 1k once and reading 100k once is the same. |
Use |
https://www.arduino.cc/reference/en/language/functions/communication/stream/streamreadbytes/ change to
|
@Llgok - Does it improve if if (httpCode == HTTP_CODE_OK)
{
size_t fileSize = http.getSize();
Serial.printf("Starting file download...\n");
Serial.printf("file size: %f Mb\n", fileSize / 1024.0 / 1024.0);
WiFiClient *stream = http.getStreamPtr();
stream.setTimeout(0); // this shall improve readByte() time. |
After testing with the addition of |
Using |
I found that increasing the value of |
@Llgok |
You do not have 500KB of continuous memory, so your malloc did not work and you are writing to NULL location. |
Test downloading 22MB zip and using
|
Alright, thank you very much for your explanation. I moved the device to a place with a strong signal, and the download speed has indeed increased significantly. In future updates, is it possible that we can hope to reach download speeds of over 1 Mb/s? |
@Llgok I am pretty sure that you mistake |
Board
ESP32-S3-DevKitC-1
Device Description
nothing
Hardware Configuration
nothing
Version
v3.0.1
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
QIO 80Mhz
PSRAM enabled
no
Upload speed
115200
Description
I called the function
stream->readBytes();
in theHTTPClient.h
library to download resources from the internet, but found that the download speed is extremely slow, averaging between 100kb/s and 200kb/s. It has been confirmed that the current network status is good, and there is no speed limit on the resource download. Although the ESP32S3 has been tested with iperf and can achieve a download speed of around 5Mb, using theHTTPClient.h
library for internet resource downloads has become very slow. Is this due to the inherent limitations of the ESP32S3, or is there something happening in the data acquisition functionstream->readBytes()
that is causing the download speed to be so slow?Sketch
Debug Message
Other Steps to Reproduce
nothing
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: