winit icon indicating copy to clipboard operation
winit copied to clipboard

MacOS scaled resolution possibly increases memory usage

Open da-shalev opened this issue 1 year ago • 0 comments

Description

I've been having many problems with winit from version 0.29 to 0.30.

I haven't been able to fully port to the new event loop due to the async requirements and my program's dependence on having access to wgpu::Surface to start the WGPU API before, so I have only been able to change to the trait-based structure. I haven't tried to port it entirely yet.

Using a scaled resolution in MacOS causes much higher memory usage according to Activity Monitor. I don't know how reliable the measurement is because measuring this accurately is hard. Screenshot 2024-05-03 at 12 52 01 PM When I change to a non-scaled resolution, it goes down to ~100MB to render to a 4k screen, which is good.

The reason I mention this is because when I use SDL2.0 bindings, this doesn't happen. I know they are different APIs with different solutions, so this could be intended. It could also be a mistake with how I'm handling WGPU 🤷🏻

Window resizing is also slow, but that seems like something you're working on your best to address.

Thought I should post, thanks

macOS version

ProductName:		macOS
ProductVersion:		14.4.1
BuildVersion:		23E224

Winit version

0.30 but also happens on older versions

da-shalev avatar May 03 '24 17:05 da-shalev