Page 1 of 1

WebServer.handleClient() longer time execution on ESP32-C3 compares to ESP8266 (930 us vs 10us)

Posted: Thu Jan 12, 2023 1:24 pm
by owiec94
Im using WebServer.handleClient() to manage GET commands with parameters in URL. This function on ESP32 takes 90 times longer compares to ESP8266.
My method of testing:
https://user-images.githubusercontent.c ... bfd299.png
with Logic analyzer.

platform = espressif32
board = esp32-c3-devkitm-1

test with few handlers (webServer.on("/setParams"......):
933us
esp32-c3_full.png
esp32-c3_full.png (96.86 KiB) Viewed 705 times

test without any handlers, just webServer.init():
933us
esp32-c3_no_handlers.png
esp32-c3_no_handlers.png (96.86 KiB) Viewed 705 times

platform = espressif8266
board = esp07
test with few handlers:
11.88us
esp8266-full.png
esp8266-full.png (100.19 KiB) Viewed 705 times
test without any handlers, just init:
https://user-images.githubusercontent.c ... da3aab.png
11.88us

ESP32-C3 needs 933us compares to 11us on ESP8266 which is 90x timer slower than older chips. In my solution time is critical and I had to slow down other peripherals (to prevent overflow buffers), which affects essential on performance.

This long time execution doesnt matter if WiFi is connected or not, also doesnt matter if we called before webServer.init() or not.

Both chips are clocked 160MHz.