3 ms·
I've used qt professionally for years and have been slowly coming to the same position, but I'm wondering about going the other direction with performance and u
by ldiracdelta 5y ago
I've used qt professionally for years and have been slowly coming to the same position, but I'm wondering about going the other direction with performance and using lvgl.io for GUI only and all the backend server communication and business logic in rust. Lvgl.io is beautiful and it runs all the way down to esp32-connected devices.
- saidinesh5 5y agoWith QML/QtQuick all/most of the ui is rendered on the GPU though. That leaves the CPU free to perform other tasks. Even at 1080p 60 fps your CPU usage sits under 10% on cheap iMX6 devices. With lvgl it looks like it doesn't utilize that GPU much, so as you move to higher resolutions, your performance and fps drops hard. If you're doing video rendering etc... That will be a pain. (Take a look at CPU usage on their YouTube videos)
- ldiracdelta 5y agoYeah, I think you would use other native technology for videos, but for simple UIs? If it can work on an ESP-32, it can work on x86 big-iron. ( I don't have a dog in this fight, yet, so tell me how I'm wrong.)
- saidinesh5 5y agoOh it really depends on your use case and the hardware you use for embedded devices. If all you need are some buttons and some kind of static lists, lvgl should be fine too. But for anything where you want things like smooth scrolling/higher resolutions you probably want to use the GPU. For eg. A badly implemented "speedometer widget" was making our whole embedded GUI stutter at 15-20 fps and 100% cpu usage (which caused other problems like overheating, timing problems etc...). 5 lines of change to make the GPU do most of the work and we were back to smooth 60fps and low cpu usage. At my last job, the requirements were like: you might as well directly target embedded linux socs instead of microcontrollers like ESP-32, because the price difference between them is not that much for the number of these devices we wish to sell.
- jollybean 5y agoQML comes with gigantically more memory usage and it's very inefficient at rendering text. If you want to render something that looks like a wikipedia page, prepare to pay a heavy price. GPU were designed for graphics, not UIs, we can certainly make them work within constraints, but it's not always a huge andvantage, and has drawbacks. 99% of what you use a UI for doesn't really get that much advantage from the GPU. That said, I think there is advantage there, we just have to learn how to use it well.
- saidinesh5 5y agoOh of course. I was talking about embedded use cases (Automotive dashboards etc..), where it is just mostly moving around various textures, playing with colors/opacity etc... (Basically the GUI lvgl youtube videos are showing off: https://www.youtube.com/watch?v=EqTG-3NHHAs https://www.youtube.com/watch?v=EqTG-3NHHAs would be a lot smoother and less CPU hungry in QtQuick ) For desktop I mostly suggest QWidget based UIs for more than one reason.