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

[Build] Reduce code size to allow for some bugfixes in limited builds #5208

Open
wants to merge 10 commits into
base: mega
Choose a base branch
from

Conversation

tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Jan 3, 2025

Features:

  • Another round of code optimizations, this time so we can fit in bug-fixes and improvements

Most reductions are from String and log statement optimizations, but also from deleting unneeded Device[] initializations.
Updates to .ino files.

  • Round 1: ca. 1.7 .. 1.9kB reduction for ESP8266 and 2.2kB for ESP32 (MAX) ([P001]..[P053])
  • Round 2: up to 800 more bytes reduction for ESP8266 and 1.2kB more for ESP32 (MAX) ([P054]..[P091])
  • Round 3: up to 250 more bytes reduction for ESP8266 and 512 more bytes for ESP32 (MAX) ([P092]..[P110])
  • Round 4: cleanup PLUGIN_DEVICE_ADD function (as suggested by TD-er) reduces most ESP8266 builds by 1..2kB, and ESP32 builds by up to 4kB
  • Round 5: cleanup remaining .ino files ({P111]..[P176])
  • Bugfix: AdaGFX_helper: Handling of arguments for [<taskname>#length."some text"] (and also textheight) would only accept a comma separator, but should also accept a period.

Total gain for the most challenging build ESP8266 Display: 3992 bytes, And an ESP32-S3 MAX build: 9788 bytes.

Further optimizations to other parts of plugin code are planned in the somewhat near future.

TODO:

  • More optimizations

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.

2 participants