slint-ui / slint

Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.
https://slint.dev
Other
16.93k stars 565 forks source link

Simply enlarge the window, and the memory will increase exponentially. #5280

Open LeeeSe opened 4 months ago

LeeeSe commented 4 months ago

https://github.com/slint-ui/slint/assets/44465325/a3043033-4695-4601-bd05-c2d86885f216

If this is normal, please close this issue.

LeeeSe commented 4 months ago

slint = "1.5" macOS = "14.5 (23F79)" default_backend ( slint? )

tronical commented 3 months ago

I suspect that this is similar to https://github.com/slint-ui/slint/discussions/4079 , except for macOS. Could you try enabling the renderer-skia feature? That would flip to metal layering - I wonder if that reproduces it.

LeeeSe commented 3 months ago

During the waiting period for a reply, I also noticed that with the increase in the number of conversation turns, the memory usage of the application increases rapidly. When I ask the LLM to “tell me a 1000-word story” three times, the memory usage directly increases by 60MB.

However, when I enable the renderer-skia feature, this issue basically disappears, and the memory usage only increases slightly with each conversation turn. But the memory change caused by zooming remains the same.


I mentioned in another issue that my application is an LLM client. Based on the information you provided, I conducted the above tests and obtained these results. The complete code can be found at dali.

image