Barrier

Slows down attackers. Unless you are micro-managing your units with great skill, you will know that when all units and buildings within range have been destroyed your robots will start firing on barriers. This may sometimes be desireable, or even necessary, in order to move onwards, but it does slow you down. If you are attacking another player then every one of the 300 seconds you get is valuable time towards that 50% destruction goal. Destroying barriers does not count towards that goal.

Building upgrade costs
The maximum build level of your barriers depends on the level of your Central Computer. Barriers increase in both cost and durability as you improve them. Uniquely, there is very little time involved in building barriers - the only restrictions are that you are not currently building anything else and that you have sufficient Water and Iron. There is also no XP gained by building and upgrading barriers, unlike most other structures.

The resource costs in the table below are for both Water and Iron, i.e. it will cost you 60,000 of each resource to upgrade to level 2. Note that the costs are per barrier unit so upgrading 65 barriers to level 4 (the limit at Central Computer level 3) will cost you almost 70M each of Water and Iron - far more than you are likely to have seen by that point in the game! The total upgrade costs also rise sharply with each Central Computer level, so it is only the higher level players with a level 7 Central Computer that can hope to max out their barriers. The protection afforded at the different levels does also rise significantly, as you can see from the calculated 'Cost per Health' column, which may help you decide how far to upgrade your barriers, if at all.

Barrier health and prices has been adjusted recently (as of 1/26/2019).

Building restrictions
The level of your Central Computer limits not only the maximum level of your barriers, but also the number you can build, according to this table.