Another example, where RC1 seriously fails ( code at the end):
This is how it should be, the "old version": a web page is created with a table, which is filled by using several JS files. The web page is build up in adequate time, and then updated with data ("lastavg") every 1 sec by a JS timer:
- Auswahl_058.png (179.1 KiB) Viewed 10526 times
This is what it is using the RC1 code, the "new version". Two of the JS scripts ( see red frame ) aren't downloaded at all (size is 0 B), although they have the web status "200" = OK. With the essential scripts missing, no data can be downloaded and the table remains empty.
- Auswahl_060.png (125.36 KiB) Viewed 10526 times
On top of this, whatever is downloaded took about an order of magnitude more time, see yellow frame. The d3* file download took 7 sec compared to 0.3 sec, so 20x longer. Sometimes it takes even 20 sec (!), i.e. takes 60x longer!
This is the relevant code used on the web page and the corresponding webserver code; I think it is straight forward?
Code: Select all
# Web page
<script src="/d3.v5.min.js"></script>
<script src="/am_common.js"></script>
<script src="/am_extra.js"></script>
<script src="/am_dates.js"></script>
# Web server code
server.on("/am_dates.js", HTTP_GET, [] (AsyncWebServerRequest *request) {request->send(200, text_js, am_dates_js); });
server.on("/am_common.js", HTTP_GET, [] (AsyncWebServerRequest *request) {request->send(200, text_js, am_common_js);});
server.on("/am_extra.js", HTTP_GET, [] (AsyncWebServerRequest *request) {request->send(200, text_js, am_extra_js); });
server.on("/d3.v5.min.js", HTTP_GET, [] (AsyncWebServerRequest *request) {
AsyncWebServerResponse *response = request->beginResponse(*myFS, "/web/d3.v5.min.js.gz", text_js);
if (response != NULL) {
response->addHeader("Content-Encoding","gzip");
request->send(response);
} else {
request->send(404);
}
});
And here are parts of the settings of the pio ini. The only difference is in the platform and platform_packages settings.
Code: Select all
; old version (working ok)
[env:esp32dev]
framework = arduino
board = esp32dev
platform =
espressif32
lib_deps =
https://github.com/me-no-dev/ESPAsyncWebServer.git#master
https://github.com/me-no-dev/AsyncTCP.git#master
===================================================================================
; new version (not working ok)
[env:esp32dev]
framework = arduino
board = esp32dev
platform =
https://github.com/platformio/platform-espressif32.git#feature/idf-master
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#2.0.0-rc1
lib_deps =
https://github.com/me-no-dev/ESPAsyncWebServer.git#master
https://github.com/me-no-dev/AsyncTCP.git#master