Game takes up less memory when using a breakpoint?

Godot Version

v4.3

Question

Hey everyone so I’m doing some optimisation for my game at the moment to try to get the memory usage down.

When I launch my game normally, it takes up ~740mb according to the Apple activity monitor, however if I put a breakpoint at any point in the _ready function for my game’s main scene (and then just hit continue straight away) the game will only take up ~540mb.

Does anyone know what could be causing this difference/how I can track it down?

I’ve looked at the monitors and video RAM in both cases and they’re roughly the same. I’ve also tried stepping through using the debugger to see if anything is causing a spike but haven’t been able to find anything. I’ve also tried deleting whole objects or functions but haven’t been able to account for the difference.

Test memory usage in exported builds, the editor may be tampering with measurements from a activity monitor otherwise.

Use monitors instead to track various resource usage within the game.

1 Like

Okay yeah thanks, the memory usage was different when exporting it so guessing it was some issue with the editor