RaphaelCochez / BIP

BIP Code Snippets
0 stars 0 forks source link

Amount of css in buffer causes memory leaks due to a lack of ram #6

Open RaphaelCochez opened 4 months ago

RaphaelCochez commented 4 months ago

css

In main.cpp

void handleCSS(AsyncWebServerRequest* request) { // Serve the CSS file File cssFile = LittleFS.open("/style.css", "r"); if (cssFile) { request->send(200, "text/css", cssFile.readString()); cssFile.close(); } }

description

-> this function can read all single page css but not multiple at the same time

-> we are short on local ram memory because of the local buffering of all the css files functionality, html content, the logo.svg and config.json files functions

see attached memory leak image

memory

-> we need to add all css into one file and simplify it, use style.css for this pupose

-> index.html and index.css can stay as is

RaphaelCochez commented 4 months ago

sizing down the css fixes the issue, keep it as simple as possible