iced-rs / iced

A cross-platform GUI library for Rust, inspired by Elm
https://iced.rs
MIT License
24.9k stars 1.17k forks source link

Text rendering is memory hungry on Windows #2064

Open sdgoihew opened 1 year ago

sdgoihew commented 1 year ago

Is there an existing issue for this?

Is this issue related to iced?

What happened?

Application becomes memory hungry on text rendering, while resizing window. No significant difference wgpu or tiny_skia ...

https://github.com/iced-rs/iced/assets/115432842/3d77c95e-d10d-410d-8eff-a39d46e1c0ce

What is the expected behavior?

Expect it to stay in under 50 mb using tiny skia.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

FaisalAhmedAlghamdi commented 1 year ago

i suspect that when resizing it keeps allocating new strings each time you resize, it is very likely that there is no memory issue since windows does not really guarantee your memory to be seen as freed once you call free on it, what it probably do is say "im just gonna tell you its been freed but i will keep it cached so when you want it you dont have to wait for long" as an optimization. memcheck will determine if there is a leak or not.

Bruce-Hopkins commented 12 months ago

I noticed a similar issue on Linux. Oddly enough, when I run a memory profiler it doesn't show that memory is increasing when using the application.