iced icon indicating copy to clipboard operation
iced copied to clipboard

High memory since 0.3

Open casperstorm opened this issue 3 years ago • 7 comments

Since updating Ajour to iced 0.3, we have noticed very high memory on especially Windows.

Windows MacOS
iced 0.3 ~195mb ~90mb
iced 0.2 ~70mb ~70mb

Here's a picture of Windows running Ajour with both 0.2 and 0.3, both builds built in release mode.

iced

It should be quite easy testable master runs 0.2 and development runs 0.3.

casperstorm avatar Apr 08 '21 14:04 casperstorm

Can confirm same issue here on windows.

The issue isn't present on Linux, pre /post the 0.3 commit its at ~112mb on my machine.

tarkah avatar Apr 08 '21 14:04 tarkah

There's a post in the Zulip about this. Memory usage has increased noticeably ever since upgrading the wgpu dependency to 0.6, and 0.7 made it even worse. The glow renderer is fine, so something is up on the wgpu side of things.

Ssaely avatar Apr 08 '21 17:04 Ssaely

@Ssaely Thanks for the heads up on that.

I wish I knew more about profiling on windows to help figure out what's causing this. We have some really cool features dependent on 0.3, but we're hesitant to roll this out when memory usage is ~3x and one of our selling points is performance :P

tarkah avatar Apr 08 '21 18:04 tarkah

Probably related to #786.

hecrj avatar Apr 09 '21 08:04 hecrj

that's awesome ajour uses iced, didn't know that, absolutely love Ajour so thanks for your team :). On this issue, I tried the fix that helped the #786 example, but it didn't change anything here. Going to try and take a look, was hoping 0.8 would have helped also but it didn't, so it's probably some niche usage of wgpu

and as a note, iced examples do it too, so it's not something specific to ajour either (also makes less code to look at)

EDIT: It appears to be a buffer in wgpu_glyph, still researching but at least narrowed it down to that

Dispersia avatar May 22 '21 21:05 Dispersia

created issue: https://github.com/gfx-rs/wgpu/issues/1407

With the fix it runs at ~68mb on 0.8.1 Capture

Dispersia avatar May 23 '21 03:05 Dispersia

Running the simple "Hello World" example from the Application trait with tokio feature enabled ate 180 Mb ram on my Win10 ... I guess the same example would only use a few Mb with fltk-rs. Wonder why this uses such high memory.

wellitecho avatar Aug 29 '21 05:08 wellitecho