I'd imagine most of it is updating/recalculating vision as AI units move?
that too, pathfinding happens between actions, FoV calculations take place during movement, there are a hell of a lot of CPU cycles used on the alien turn between the two.
when the AI calculates paths, it calculates ALL of the paths using
Dijkstra's algorithm before using
A* to define specific paths to various "points of interest".
i could go into a lot more detail, so i will:
every time the AI plans an action, it tries to create four possible scenarios: patrolling to a node, attacking an enemy, escaping from an enemy, or setting up an ambush, and then picks the one it prefers based on the situation.
The first option is fairly straightforward, if you have a defined node you want to go towards, simply find a path towards it, if you DON'T have a node defined, check through the list of nodes connected to the last node you visited and pick one based on preference, then check it can be pathed to, if not, pick again. if no options are valid, or if you're a scout, start picking nodes at random and pathing to them until you pick one you can reach. at this point, if all has gone well, patrol becomes a valid option.
the second option is less straightforward: first, take stock of the weapons you have available. if you have a melee weapon, pick the closest enemy you know about and try to path to any tile that's within melee range of them. if you have a firearm, we start to get into bat country: based on where your target is, we calculate a bunch of tiles from which a unit of your height could potentially get a shot off using a hypothetical unit to perform LoF calculations, checking to make sure you can actually path to said locations. at this point, if all has gone well, attacking is a viable option.
if you're escaping, you do something similar, only you're tracing the LoF from your enemy to a bunch of tiles that hypothetically contain a unit of your height, that you are capable of pathing to in order to find somewhere that you can move and they can't hit. if this works out escape is an option.
if you're setting up an ambush... both you and your enemy become hypothetical. you start by calculating a path from your enemy to your current position, and calculate LoF from a bunch of tiles from which a hypothetical unit of your height could shoot a hypothetical unit of your enemy's height hypothetically walking along said path, and then calculate paths to those positions that leave you enough TUs to make a reaction shot. if you find a match, ambush is on the table.
after calculating all this, you take your situation into consideration (desperation, morale, injury level, etc.) and choose a preferred option. do this all around 6 times per turn (sometimes more, sometimes less)
when you see an alien moving, the pathfinding is already done, and we can calculate the FoV between frame updates (i believe between frames 4 and 5) but when you don't see it, we simply update the unit's position and calculate the FoV every frame. you can observe this same effect by moving one of your own units that is offscreen, you'd expect him to take 10-15 seconds to appear on screen if he were walking at a normal pace, but instead they'll pop into frame after only 1 or 2.