Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert tinygs logo in internal web page from base64 to binary array. #261

Open
wants to merge 2 commits into
base: beta
Choose a base branch
from

Conversation

bertrik
Copy link

@bertrik bertrik commented Oct 20, 2024

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)

@bertrik
Copy link
Author

bertrik commented Oct 20, 2024

Hm, might also combine this with #242
The display='inherit' part is repeated in this patch

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

Successfully merging this pull request may close these issues.

1 participant