Improving the device’s performance, battery life and storage optimization
There was a lot of room for improvement on microreader’s infrastructure, and I have spent some considerable effort on making sure everything is fully optimized before I start working on redoing some of the UI.
For starters, I have removed the settings menu entirely and moved it to a text file, so everything is hardcoded at build time! This reduces the closure size and makes the system faster since it’s no longer reading from flash. You can see what the UI looks like now without the settings menu in the attached image.
There was a lot of trial and error of trying different values to see what’d work with things like SD card speed and QIO bootloader options. I found that when using the most optimal options, the device would refuse to boot or read from the SD card, so unfortunately the default bootloader options and 20mhz speed is the fastest this device can handle 😭 (tried 40 and even 26.67mhz)
I also tried using light sleeping but found that it doesn’t work either. It would’ve worked great for this device but due to some weird issues with the ESP32, when I unplug the device and run it off of battery the buttons would just stop working.
I have improved the SD card management so that there’s no backups and now there’s less overhead when writing book save data.
By far the most amount of time was spent on the config where I removed a lot of things from the closure and disabled unnecessary checks. For example, the bootloader ran a validation on the image on every boot, so disabling that made boots faster by about 100ms with zero drawbacks! I also stopped logging and kept with the repository cleanup so that now the flash went from 1.663mb/.123 to 1.573mb/.121mb, which is pretty small but still nice for making this device smaller and a lil bit faster.
So yeah, the project is in a VERY nice and optimized state right now. I am going to improve on its usability and UI!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.