Most efficient way to get all actors in front of another actor

I am making an RTS which may have over 200 units at any time.
I am trying to think of a way to get a reference of all actors in the unit`s viewport.
Comparing the distance of every actor on map for every unit sounds way too expensive.
How would you implement this?

I have thought of placing a trigger box in front of the actors that will get all overlaping units but i think it will interfere with projectiles and other fuctions that use overlaping events

There are a few threads that ask this very question.

As far as a trigger box though, you can set the channels and whatnot so that it only causes overlap events with specific classes.

I was not aware on channels, this definitely sounds like the answer of my problem, thank you