Maybe a very novice question: how can I optimize Slint's performance and memory usage? #3376
Replies: 2 comments 2 replies
-
Thanks for starting this discussion :). This is a good topic and I'm interesting in exchanging experience and measurements. Maybe they'll lead us to some discovery and perhaps opportunity of optimisation. I don't quite have any data on start up time, but I have two data points on file sizes and memory consumption. In terms of file sizes, this is what I see: For me, on Windows, Qt6Core.dll is 5.6 MB, and if you add Gui, a Qt application will have a disk footprint starting at 13-14MB. In terms of memory consumption, one thing I notice is that the memory consumption appears to correlate with the size of the window. For men an empty qmlscene window weighs in at around 35MB in the task manager. It starts out with less, but as I resize it to around 1200x800 that's where it ends up. A similar minimal This is in a VMware virtual machine with Vmware graphics drivers. My suspicion is that the memory consumption that you see is likely related to how your graphics drivers allocates window surface buffers. With Skia I think the D3D swap chain will have at least two buffers the size of the window. Do you also observe a correlation between the memory consumption and the window size? What's your graphics driver setup? |
Beta Was this translation helpful? Give feedback.
-
Why do GUI applications take up so much memory? And what does memory consumption in a GUI app depend on? I'm quite new to GUI app development |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(I have so many questions. I don't know if it's right to raise them here. If it bothers you, please point out for me)
Environment: Windows + Rust + Slint (renderer-winit-skia)
A blank window will use about 50M of memory. This number increases dramatically as the number of windows increases.
I know that different backends will behave differently. I've tried every other backend except qt. No backend wins overall.
As a result, I couldn't get a program that was comparable to Qt programes in terms of file size, window startup speed, and memory usage.
I don't know if that's normal. In fact, I'm willing to sacrifice performance for fast development.
What I want to know is that if there is still room for optimization, and where I can start to optimize my program?
If you'd like, you can check out my project code https://github.com/Horbin-Magician/rotor-rs. This is a very rough project and will only work successfully on Windows system.
(Please forgive me if I have a lot of information left out. If there is any information that is not provided, please feel free to ask.)
Beta Was this translation helpful? Give feedback.
All reactions