Open B4stl3r opened 11 months ago
Use 7-zip to compress your web files to gzip format and serve those instead for a great reduction in transfer size and ram usage.
If having issues on iPhone rename the files from JavaScript.jz.gz to JavaScript.jsgz. Remove the extra .
that's what I already have in place ;)
Any other hints?
I've some websites which are served via the Asyncwebserver, including some .css, .js etc..
here you can see the free Heap before calling the website: [app] main: Free:94388, maxAlloc:69620
during sending of one page (which will also request additionally .css, .js..) via request->send(SPIFFS, ("/www" + page)); the free (ESP.getFreeHeap()) and maxAlloc Heap (ESP.getMaxAllocHeap()) goes dramatically down: [app] before sending: Free:89048, maxAlloc:65524 [app] after sending: Free:78320, maxAlloc:51188
[app] before sending: Free:76836, maxAlloc:51188 [app] after sending: Free:65600, maxAlloc:36852
[app] before sending: Free:70636, maxAlloc:42996 [app] after sending: Free:65808, maxAlloc:38900
[app] before sending: Free:65620, maxAlloc:34804 [app] after sending: Free:57096, maxAlloc:27636
so to serve the full site, I require ~ 40kb of heap.. after page is fully served, everything goes back to normal: [app] main: Free:95720, maxAlloc:69620
Already tried chunked response (taken from a thread here), but the Heap usage is similar (~2kb less).
);
Any Idea's / Heap gentle code ?