luc-github / ESP3D-TFT

ESP3D Firmware for ESP32 based TFT
GNU General Public License v3.0
38 stars 9 forks source link

Flash usage optimization #36

Closed serisman closed 1 year ago

serisman commented 1 year ago

I noticed the 4MB flash targets are getting a little tight on Flash usage.

I don't think we can tweak the partitions.csv any further (without losing OTA support).

I did find a few easy optimizations that will buy us more time before we have to address this further:

I did notice that simply turning off notification support (NOTIFICATIONS_SERVICE) makes a huge difference of around 200KB savings. It looks like most of that is X509 / certificates. Might be something to look into optimizing further at some point.

serisman commented 1 year ago

Oops... I accidentally checked in some style changes to this branch. I meant them for a separate branch/PR. Let me know if you would like me to separate them out, or if you are ok reviewing/merging together.

These style changes fix some issues I found, particularly on the lower res 320x240 screen. They should also make things a bit more consistent across all the resolutions though. I have tested on 320x240 and 480x320 screens and things look decent. I don't currently have any 480x272 or 800x480 screens to verify, but I assume they will still look ok there as well.

luc-github commented 1 year ago

I will have a look today

luc-github commented 1 year ago

Merged thank you ^_^