Length of the gas line is irrelevant. Length of the liquid line to the tap is important. The longer the line, the further you have to push the beer (more resistance) which reduces pressure at the tap and gives you a nice pour. To much pressure and the beer shoots out and you have a cup of foam.
Narrower lines should require less length. Higher serving pressure requires more length. Etc. etc.
Starting long and reducing to what works for your system is the best way to go.
If, for some reason, you need short lines you place epoxy mixers into the dip tube which creates resistance and allows a good pour with a minimal line. There are a lot of threads on this if you google it.