You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been rendering a bunch of images in my GUI app, and GPUI was using about 300 megabytes of RAM for that, which is extremely wasteful. Not a bug, I think it just wasn't implemented in 0.2.2.
A good way to solve the waste is, I think, not to retain any image bytes on the CPU side as soon as the image is uploaded to GPU. Which is exactly what I did in my GPUI fork at fabbb60 as part of main...berylorg:zed-fork:gpui-fork .
GPUI's memory consumption on rendering about 6 images on in a relatively small window went down from 300 megabyes to like 12. Scrolling is super smooth due to optimistic overscan handling.
Not offering my code for upstreaming, but just saying as part of a discussion - GPUI clearly needs some sort of a reasonable solution, 300 megs of RAM for something that is already uploaded to the GPU is just not optimal. Large images should be allowed to be lazily uploaded to the GPU on demand and not remain cached in RAM, they're just too large for that.
PS. I only have Windows, so not sure how any of that affects Linux and Macos platforms.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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've been rendering a bunch of images in my GUI app, and GPUI was using about 300 megabytes of RAM for that, which is extremely wasteful. Not a bug, I think it just wasn't implemented in 0.2.2.
A good way to solve the waste is, I think, not to retain any image bytes on the CPU side as soon as the image is uploaded to GPU. Which is exactly what I did in my GPUI fork at fabbb60 as part of main...berylorg:zed-fork:gpui-fork .
GPUI's memory consumption on rendering about 6 images on in a relatively small window went down from 300 megabyes to like 12. Scrolling is super smooth due to optimistic overscan handling.
Not offering my code for upstreaming, but just saying as part of a discussion - GPUI clearly needs some sort of a reasonable solution, 300 megs of RAM for something that is already uploaded to the GPU is just not optimal. Large images should be allowed to be lazily uploaded to the GPU on demand and not remain cached in RAM, they're just too large for that.
PS. I only have Windows, so not sure how any of that affects Linux and Macos platforms.
Beta Was this translation helpful? Give feedback.
All reactions