Hi, all,
I had some time to make semi-scientific measurements and compare the classic ESP8266WebServer and the AsyncWebServer, both under the current 2.3.0 version of the ESP8266 "cores" (boards package) as well as under the git as of Aug. 19, 2016 (I call it 2.4.0-pre).
Both servers were used to implement a dynamic page which generates dummy content of custom size.
Then, each of the 4 versions (2 libs * 2 core version) was called:
- first to download 4 payloads of 100KB in sequence (4 wget in a batch, called in turn), and the total time was measured
- then to download the same 4 payloads in parallel (the time was measured being between the start of the script and the end of the slowest download)
And that cycle was repeated 10 times to get a representative average.
All those 80 numbers were collected and compared, but I think a chart is worth a thousand numbers:
[attachment=0]image.png[/attachment]
Conclusions ?
With current production cores (2.3.0), transfer is slow with the standard ESP8266WebServer (around 180kbps, no matter if you use call in parallel or in sequence). If you use the AsyncWebServer lib and perform the calls in parallel, you get an important gain (factor 2: 350 kbps), not counting the fact that your loop() can now do work in the meantime.
But what really gives a huge boost is the cores in the current git (2.4.0-re), where speed gains almost a factor 10 with the standard ESP8266WebServer (around 1500kbps). Surprisingly though the AsyncWebServer does not gain any boost with these cores, so I guess an update of the lib will be needed.
All comments are welcme of course.
Kind regards,
Vicne