-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ESP32-S2 web OTA idle performance question #6009
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 when you add delay(1); in the main loop? I had a similar problem with the webserver on the ESP32-S2 a year ago or so. Not sure if it's still fixed, or the fix has been reverted. If that makes it faster, the problem is the webserver, not OTA. |
The purpose of the sketch was to measure the speed of the mainloop. By adding the delay (1) in the mainloop the starting speed decreases. |
A year ago, adding delay(1); to the loop significantly reduced the response time by the webserver. |
With delay(1) inside SpeeTest3 the speed is: This because httpServer.handleClient() already has a delay(1) ... WebServer.cpp void WebServer::handleClient() {
if (_currentStatus == HC_NONE) {
WiFiClient client = _server.available();
if (!client) {
if (_nullDelay) {
delay(1);
}
return;
} |
Being curios what results do you get with a ESP32? |
Sorry, i don't have ESP32 chip. |
If you are after performance, I would take a look at: |
Hello @snico2, can I consider this as answered? |
Hi, yes |
Since we added this https://github.com/tasmota/arduino-esp32/blob/main/cores/esp32/Esp.cpp#L244-L246 and here https://github.com/tasmota/arduino-esp32/blob/main/libraries/Update/src/Updater.cpp#L390 |
I believe this is the same issue as #7708. |
Hi i have repeat the test with other Board/Chip. ESP32 is always slower than ESP8266 even without the Delay(1). But using the old version ESP32 Arduino 1.06 the execution time improves a lot using httpServer.enableDelay(false). Using Delay(1) the v1.06 it has the same tempo as v2.07 SpeedTest-4 with httpServer.enableDelay(false); CHIP ESP32 240 MHz CHIP ESP32-S3 240 MHz CHIP ESP32 240 MHz SpeedTest-3 without httpServer.enableDelay(false); CHIP ESP8266 80 MHz CHIP ESP32 240 MHz CHIP ESP32 240 MHz in summary, httpServer.enableDelay(false) improves times but does not solve the problem |
Hi everyone,
I have noticed strange behavior of the web OTA software (in idle state) between the ESP8266 and ESP32-S2 chips.
I performed a series of 4 tests on the same incremental code to measure the time taken to execute 500,000 Main Loop cycles and calculate the relative speed.
The boards used are:
ESP-01S with chip ESP8266 single-core Tensilica L106 80 MHz
LOLIN S2 Mini with chip ESP32-S2 Single-core Xtensa LX7 240 MHz
Considering the characteristics of the chips as a result of the tests I expect a much higher speed of the ESP32-S2 chip.
The tests were performed on 4 sketch adding a new functionality to each one.
In the first test the MainLoop was empty without defining and calling other libraries.
ESP32-S2 was 5.6 times faster than ESP8266
In the second test the definition of the Wifi library was added and the connection to the network, the MainLoop was not changed.
ESP32-S2 was 5.6 times faster than ESP8266
In the third test, WebServer, HTTPUpdateServer and WiFiClient libraries were added for the web OTA functionality.
In the mainLoop the call to the "handleClient()" function has been added.
Surprise, ESP8266 was 79.8 times faster than ESP32-S2 !!!
The fourth test was performed only for ESP32, adding the call to "enableDelay(false)" first of the "handleClient()"
ESP8266 was 1.2 times faster than ESP32-S2 only
Why is ESP32-S2 even slower than ESP8266?
Is there something still to be optimized in the web OTA library?
Thanks.
Test summary with Value Average:
SpeedTest1.ino code
SpeedTest2.ino code
SpeedTest3.ino code
SpeedTest4.ino code
The text was updated successfully, but these errors were encountered: