Microprofiler Help

My game gets lag spikes that are sort of noticable occasionally, so i started debugging using microprofiler. I checked for what makes the lag spikes and it is apparently something called “steplegacy” under game stepped, simulation. It takes roughly about 19 ms and i’ve done some research and it apparently means that its movement updates, I wasn’t moving whilst this lag spiked happened and i am not that experienced. If i could get more of an insight to what this is and possible causes that’d be great. It is possible that one of my scripts is doing it so i might look at that if the general solutions dont work. Thank you for your time.

19ms… So you dropped to roughly 52 FPS.

Nobody’s every truly elaborated on “stepLegacy” before, but from what I’m seeing, it’s got something to do with some legacy system using a propagating raycast.

Do you have terrain in your game? If so, do you have a lot of terrain?

i don’t have terrain but some of the hitboxes use raycasts using the raycasthitbox v4 module, think it might be something with that?

to further elaborate on this, it appears one hitbox is always stored in memory (for some reason) so its possible that might still be getting updates. just thought i should mention this.

Aye, my bad. It’s just Stepped so you’ve got something that has to do with Stepped going on every so often. This changelog covers the details.

Desired Change Log: July 8, 2019

guess i gotta do more debugging but thanks for the help