Ack, the version you uploaded still had the _x error! Oops! The problem with _x being the forEach iterator and being a sensible name for x-axis position is a pain ;P Good to see you worked that one out! You'll notice that I use "_ids = _x;" to avoid overwriting the value in the nested forEach loop, but I didn't consider the _x script parameter.
I noticed that you pass the player's unit to the script. Well, when a player respawns, the unit changes, so that would break the script. Also, it wouldn't work when in an MP game, where each player object is different. Forget passing _unit and just use the
player command to resolve both these issues. Make sure that you don't run the script on a dedicated server too, since it is just client-side eye-candy (At the top of the lights script, exit if dedicated server: "if (isServer and (isNull player)) exitWith {};").
As far as frame-rate goes, I found the frame-rate about the same in both versions. Remember that you can't compare the frame-rate of a player flying a Camel in one position to the frame-rate of a soldier standing in another position, which may have been giving faulty readings.
Consider what happens when the player is beyond the maximum distance away from the lights. The outer while loop will run continually without breaks and the machine will come to a halt, since no other scripts are being allowed to run. If the player is too far away, then you need to take sleep breaks on each iteration (I'd suggest a couple of seconds).
You used mod correctly, but it isn't strictly necessary for the "_i" loop. The value can only be out of range when you are looking at row (_i + N), when the value needs to be modded to "wrap it around".
Further ideas: Allow for two or more sets of lights to be lit at the same time (e.g. for two sets: _i off, _i + 2 on, _i + 28 off, _i + 30 on). If you do this, you could probably be fine slowing the speed of the lights a bit, without making it harder for the player to work out where the runway is (I'm suggesting this without knowing what these sorts of lights would look like in real life; anyone got a video link to an example?).