The ideal is to hit 20 to 50 balls on the range - not to work on your swing, but just to get a feel and rhythm for your swing. Work your way through the bag from short irons to longer clubs and also to hit a few drivers.
Remember to also do a few stretches to get the muscles warm.