Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Async Web Server - using Strings, and consuming ++ heap space - when sending large blocks of data / web page #3

Open
salasidis opened this issue Sep 30, 2022 · 0 comments

Comments

@salasidis
Copy link

I do not have access to an ESP32 board, but I used the AdvancedAsyncWebServer example to demonstrate the issue.

On the default program, I added some code to print the heap size, and I increased the graph array from 50 to 500 points.

On the modified program, I created a C string instead of an Arduino String, and sent the same 500 line graph svg file

There is a word file that shows the outputs, and the outputs demonstrate that if sending an Arduino String, the software requires 2x extra heap space on top of the the actual string size.

If sending a C string, it takes 3x.

My proposal is to have an option (separate call, or modify the current ones), that can use the c string as is, and simply pre and post append to it any headers and footers required, without creating new Arduino Strings in the library

(having trouble posting ZXIP file - will try after submit this)

Here is a link to the ZIP file - 2 arduino sketches (one the default one - with only the minor changes listed above, and the other with the C string use) - ? could not upload the file directly

https://1drv.ms/u/s!At0Rrq6KzAeZheBLHtfLiaYglHDtLA?e=gegmIb

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant