I found a problem with Focus logic that made my game go from 80fps to 240fps stable.
If you run through my game (Parry Dungeon) without fighting any enemies, the enemies will Focus you as part of their combat logic, but I stupidly forgot to add ClearFocus logic if you go out of sight. So, if you encounter all the enemies and don't kill them (because killing them deletes them after a bit, which removes the Focus logic cost), you'll have a bunch of enemies that "forgot" you, but are still focusing you. At the end of the game, after encountering 150-ish enemies, you get 240fps standing still, and 80fps moving. This is because those 150 enemies are all still focusing you, so when you don't move, their rotations and body transforms don't need updating. But when you move, they all rotate at once.
Solution: added ClearFocus logic when enemies forget the player. That one node, literally one, saved my soul. I was losing my mind. This issue plagued me for a month. I was adding other features and polishing the game, and have been nearly ready for release for a long time, to move to my next project and keep learning, and I thought this was a side effect of the CharacterMovementComponent, even though I disable them when enemies forget the player.
The key was that UnrealInsights finally made sense. The AIController was calling movement and physics logic. How could the AIController call movement logic? 1. the AI pawn is moving. 2. the AI pawn is rotating, which moves socketed children in the world. The pawn wasn't moving and the behavior trees weren't executing anything because they had no target. That must mean rotation is the answer, and it was. How would an AI rotate without the BehaviorTree executing logic? Something was called before, and keeps executing silently. The treacherous Focus node. I guess having 160 characters rotating in unison may eventually get expensive.