Where can I control the length of the dashed line indicating the rotation of a sun lamp
You could always parent the Sun lamp to say, a single-arrow Empty, aligning the lamp to the direction of the arrow.

Bearing in mind the position and scale of the lamp will have no influence on its effect, (only its rotation,) it should be easy to find a convenient scale and location for the arrow for adjustment, and you can hide the arrow, too, without switching the light off.