Dont get this wrong
The Bonus for being on the Wall should Replace Formation Bonus
Means you will only get what the Building has to Offer and lose all Bonusses from your Formation.
if you dislike the Defending Unit having higher Bonus than the Attacking just adjust the Values so that the Building is actually offering less or the same amount of Bonus that an Formation would offer
As for Lag
If Lagspikes are a problem how about fusing Units with the Building?
Just determine the Positions without Units needing to find it.
And after that count the Unit as an own Building
as an Own Building it will be a semi permanent Unit which is unable to move and thus will not be countet into the regular pathfinding processing.
Much like an Wall Mounted Trebuchet
by doing that you would actually lessen the lag by stationing troops on a wall
Well nothing will be eaten as hot as it was cooked
we will see what you guys are doing in that regard after that we can still suggest an improvement -.^
In the Shadow of the Black Cross. We Fullfill our Duty in your Name.
And Look forward to the Day we Return to your side Silvanos.
Watching over our Comrades as they Fullfill their Duty in your Name.