It's not that hard for an official; they have to run in one dimension, either left or right and the only decision making which factors into their direction of travel is the location of the 2nd last defender.
Defenders have to run 360 degrees dependant upon the location of the ball, the anticipated location of the ball, the position of any attackers, the position of their fellow defenders, etc... They don't run in straight lines very often, more likely arching their run to accommodate the above factors.
It shouldn't be hard for a lino to be where they should be, it at least within a yard or two, not close to ten yards behind play.
Not that any of that condones idiots throwing objects.