Low FPS on one screen

This is my ESP32-based clock/air monitor

For some reason the FPS drops to 20 when I switch to this screen:

And it drops even more when I make the TEST label longer and scrolling. The FPS was 30 when I changed the font of the time label to a smaller one, so I assume it is somehow related to that, but on another screen I also use the big font, but the FPS is still 30.

Any ideas what could be the reason for that drop?

Your FPS is going to change based on what is being updated on the display. the more there is to update the longer it is going to take to do the work. That means a lower frame rate. LVGL holds the last frame rate measurement when there is no changes being made which is the reason why you are seeing it at 20FPS. You know that no updates are being made because the CPU is at 0% and the update time is at 0ms.

The change from the one screen you have posted to the other screen you have posted is a complete redraw of the entire frame.

another thing that is going to effect it is the size of the clock. the larger the widget the larger the update is going to be when that widget changes and the larger the amount of information is going to need to be written there for taking longer to update the frame which means a lower frame rate

LVGL’s internal mechanics for measuring the frame rate is also skewed when using the partial render mode. It is not measuring the amount of time it takes to update the entire frame but instead it is measuring the amount of time it takes to update a single partial buffer which most times is going to be 1/10th the size of the display. I would have to double check this to see if it has been corrected but the last time I checked (v9.0.0) it was not fixed.

I found the problem - I was updating the time label every 5ms even when there was no change in the time. I didn’t know that this would still cause a redraw (and it didn’t seem to make a difference on the other screen with a smaller clock font).
Now I have a scrolling label under the time and it still get 30FPS.

As an expert with WROOM SOCs, do you think it is possible to get even more FPS on those devices (CYD, using TFT_eSPI)?

you are going to have slower running code by using anything Arduino. this is because it’s all wrapper code to make it work so there is additional instructions that have to be processed to do things. I am not sure if the the libraries for the Arduino make use of DMA memory. I don’t believe they do. If they don’t then there is performance that can be gained by using DMA memory and double buffering.

1 Like