How to estimate memory usage #7383
-
To use 'slint' on small memory devices, it is necessary to estimate the approximate memory consumption first For example, if a 100x100 rgb565 screen is driven by an MCU and a software renderer is used for slint, do we need 20,000 bytes to create a basic frame buffer. Or maybe rgb565 comes from the conversion of rgb888, but actually requires a basic frame buffer of 30,000 Byte For example, does a 20x20 button require 400Byte as the frame buffer for the button If there are multiple page transitions, does each page require an independent frame buffer of the same size as the page |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you use the rendering line by line, you do not need to create a frame buffer on the MCU. You only need to hold one line in memory. You do need some minimal amount of RAM to hold the Slint runtime and your UI logic. I don't have exact number, but I think it might be hard to use Slint with less than 100K of RAM total, regardless of the amount of pixels. |
Beta Was this translation helpful? Give feedback.
If you use the rendering line by line, you do not need to create a frame buffer on the MCU. You only need to hold one line in memory.
Depending on the display, the frame buffer can be on the display itself and not in RAM.
You do need some minimal amount of RAM to hold the Slint runtime and your UI logic. I don't have exact number, but I think it might be hard to use Slint with less than 100K of RAM total, regardless of the amount of pixels.