mrbwaters / fire_drill

1 stars 4 forks source link

We have a memory leak :( #75

Closed mrbwaters closed 2 years ago

mrbwaters commented 2 years ago

The good news is: The latest build has much smoother movement!

The bad news is: There is a pretty severe memory leak.

I was noticing some slowed performance while testing so I loaded up the GameMaker debugger (hit F6 in the IDE) to see what was going on. This is what I found:

image The image above shows the Memory demands of the Beta_2022-01-02b build compared to the memory demands of the current build. These screenshots were taken after about 2 minutes of running each build.

Not only does the current build use 20x as much memory, the beta build stays stable at about 35 MB throughout the entire run, whereas the current build's memory demand just goes up and up, seemingly unbounded.

My guess is that the new helper functions have a memory leak in them. It could also be the new game-fsm or any other changes we shipped in the past day or two.

I don't know a ton about memory leaks. I do know that data structures are prone to them if you don't implement them very carefully. Have we introduced many ds recently?

This is a priority 1 bug as it will cause the game to be unplayable. @jbussing @eddivita

jbussing commented 2 years ago

https://github.com/mrbwaters/fire_drill/pull/76 Should hopefully fix this

jbussing commented 2 years ago

Usage with #76

mem-usage