avonian/soundstage-vr

investigate potential memory leak with video avatars

Closed this issue · 4 comments

dummyavatar was implemented very similar to holoavatar, and I notice that when I spawn a large number of dummyavatars and dispose of them, that the memory doesn't get freed

I believe I'm using the same mechanism to dispose of the dummyavatar's as the system uses for disposing of holoavatars/videoavatars, which may indicate that we still have a memory leak with those.

i can confirm that during our last event my browsers webgl crashed towards the end of the event

this smaller memory leak would be harder to detect in a real event since people come in and out slowly over time, and the hit from each avatar is negligible, but they add up over time, it only becomes obvious when testing dummyavatar with large numbers (try setting to 20, then to 0, then 20 again)

This is low priority and not serious, I'm observing 100 MB of RAM consumed for every 20 video avatars, so negligible at best. I'll monitor next real world event to see if I can detect anything else that might be at play.

we're leaking
https://assets.soundstage.fm/vr/avatar_default.png
to reproduce, login in debug mode, login with another browser, disconnect, watch number of textures

... and also materials and meshes :) fixed in main

awesome!