So I've made this shmup (can't share it, it's for sponsorship). Everything runs smoothly, even levels with a ton of enemies.
But then, sometimes, playtesters have reported extreme slowdowns, starting at various points in the level.
I can't figure out why this could be happening. It's not the number of actors, since the slowdowns have been reported in levels with few actors. It's not some improper loop or timed behavior. It's not connected to any specific actor, since plenty of levels with the same actors don't have any problems. It's not a scene behavior, since all levels have exactly the same ones, and most levels are fine.
The problem is rare - about 3-4 out of 50 levels. But I can't figure it out. What else could be causing it? What am I not thinking of?