-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
I noticed that Metal playgrounds start hanging for me after a couple of minutes and started looking around for clues.
The memory footprint of playgrounds increase linearly with the framerate, but the memory leak instrument fails to locate any leaked resources.
The video below shows the playground's memory footprint expanding at ~110 MBps at 60fps until the app hangs (no idea if the hanging is related or not). When capping the framerate to 30fps, the expansion rate is halfed.
Screen.Recording.2022-12-19.at.12.39.18.PM.mov
I sampled a few different Metal playgrounds and they all seem to exhibit the same behavior/per-frame "leak" rate, including simple playgrounds that don't involve the Entities renderer, like Play/RendererTest.ArrayUniforms/Metal.
Again, I'm not sure if this is an actual leak yet because I don't fully understand the information I'm looking at, and the permanent hang that occurs after a couple of minutes may or may not be at all related. My understanding is that NSObjects are refcounted these days and there shouldn't be any garbage accumulation going on over time.
Had some trouble getting LSAN to work right this morning, but will take another swing later.
FYI @chinmaygarde