The most efficient way to structure a multi screen LittlevGL project

There are basically two main ways I can think of/have seen of structuring a LittlevGL application:

  1. Create every screen and object at the beginning, and hide everything you don’t need. This will give you high graphics performance, but will obviously use a lot of memory. There would be almost no delay while switching screens. (For my projects, I’ve generally used this approach, because I have plenty of memory available.)
  2. Dynamically create/remove a screen at a time. This approach works better in memory-constrained environments, but depending on the resources you have available, you might notice extra lag when switching screens. Obviously, the extent to which you have to apply this idea depends on the abilities of your target device.

It sounds like thus far you’ve been using Method 1. In this case, I would ask what constraints you are running up against. Are you running out of memory? Is the UI unresponsive?

2 Likes