Replies: 2 comments 1 reply
-
templating requires to load the template in memory. MCU is low cpu / memory: all the templating should be done client-side, and mcu only called to get static pages plus json api for the data. this mostly require a rework on how you process your UI to delegate some work to the browser instead of doing it for each client on the MCU. |
Beta Was this translation helpful? Give feedback.
-
I have an example that will serve lage files from LittleFS. ( not using template ) I use javascript and an API to get data on the webpage normaly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am looking for the solution for efficiently serving large files from LittleFS partition. I also need the template processor feature.
Currently I serve web page files like this:
However, my page is not so small - 12 files that are 67kB in total.
During client connection I observe increased heap usage (minimum ever free heap size goes down from ~70000B to ~2000B).
What's more, web page files are often not served in full. It seems like sometimes the file transfer process is interrupted and the browser displays the page that is not complete or some JS scripts are not working.
What I have already tried:
Is there any way to serve large static files efficiently & keep the template processor functionality?
Beta Was this translation helpful? Give feedback.
All reactions