Best Approach for LVGL UI: Single Screen with Panels vs. Multiple Screens

Hi everyone,

I’m working on an LVGL-based UI and trying to figure out the best approach for screen design. I have two main options:

  1. One screen with many widgets
  • All UI elements are placed on a single screen.
  • Using panels to organize different sections.
  • Potential performance concerns with rendering too many elements at once.
  1. Multiple screens with fewer widgets per screen
  • UI is split across multiple screens.
  • Each screen contains only the widgets relevant to its section.

Right now, I’ve already built a single screen with multiple panels—for example, one screen with 5 panels, each containing 10 widgets (total: 50 widgets). My question is: would it make any difference in memory or performance if I split this into 5 separate screens with 10 widgets each?

  • Which approach is better for performance and responsiveness, especially on resource-limited MCUs?
  • How does LVGL handle a large number of widgets in terms of memory usage and FPS drop?
  • Do any of create extra pressure on BSS?

Any advice or experiences would be greatly appreciated!:blush:

It can - if you use temporary screens, and the screen-loading and screen-unloading events to populate them as needed, typically you only have up to two screens of widgets loaded at a time(specifically, during a screen transition, the next screen is loaded, then the transition occurs, then the old screen is destroyed).

If you do not use temporary screens, the UI memory usage will be higher.

With everything on one screen, the IO memory usage will be higher too.

How does LVGL handle a large number of widgets in terms of memory usage and FPS drop?

LVLG handles large numbers of widgets surprisingly well. If your display bus is slow, but can do partial updates, I believe LVGL will render and send only the objects that are not hidden, and have changed or were impacted by another widget changing.

That said, screen transitions are often the worst-case, as two screens are loaded, and every drawable widget of each that is viewable on the display will be rendered.

This question would probably be best answered by prototyping as soon as you have your MCU, display, and input device ready.