OK, with you.
I assume there’s only a small number of grid actors, but a large number of ‘general’ actors.
I would change that ‘get all actors of class( actor )’, and give it a specific class to look for. Something that there is, ideally, only one of in each level.
‘Get all actors’ is well know for slowing everything down. But if you specify a class, the system uses a hash, and can find them immediately.