How can I know what array is usnig luauHeap is located?


image

It appears that there is a huge cpu usage in my game however it only appears for a second resulting in lag spikes, Ive looked into every table I had but I cannot pinpoint the issue due to the array not being specific

1 Like

Does this happen in Studio as well? You can use the Script Performance tab to see the activity of your scripts

Thanks however this isnt what thyst needing, I know what script this problem is from however i dont know which line it is caused from. Thats what I mean with is what line the problem is caused from

And yes this happens in both studio and ingame

Would you be able to send the script? From context alone, it looks like you’re creating some gigantic nested array or table, but I can’t really determine that without a script reference

That “spike” usually means something heavy is happening in a single frame (e.g. large table resize, mass object creation/destruction or garbage collection). Try adding markers with the microprofiler or spread big loops/workloads across multiple frames → this will help narrow down which code path is causing the one-off CPU jump!!!

1 Like