tinyGS
tinyGS copied to clipboard
Convert tinygs logo in internal web page from base64 to binary array.
A remark of an earlier merge request for adding a favicon, was that it adds some more data to flash / program memory. Especially the esp32c3 suffers from this.
This patch changes how the tinygs logo data is stored internally, from base64 to a byte array. Base64 causes about 33% inefficiency by the way it is stored. I copied the logo exactly as it appeared earlier, but now instead of using it as inline base64 in html, it is stored as a binary array at /logo.png.
Difference in memory use:
- original beta branch:
Retrieving maximum program size .pio/build/esp32c3/firmware.elf
Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 16.9% (used 55500 bytes from 327680 bytes)
Flash: [========= ] 92.5% (used 1211912 bytes from 1310720 bytes)
- with this patch:
Retrieving maximum program size .pio/build/esp32c3/firmware.elf
Checking size .pio/build/esp32c3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 16.9% (used 55500 bytes from 327680 bytes)
Flash: [========= ] 92.2% (used 1209132 bytes from 1310720 bytes)
Hm, might also combine this with https://github.com/G4lile0/tinyGS/issues/242 The display='inherit' part is repeated in this patch
Thanks for the pull request.