Another important feature in the history of Universe are the proto-galaxies. In the last 30 years we were able to observe only a few dozen of these proto or primeval galaxies, which mostly looked like shapeless blobs with an intense UV emission.
A proto-galaxy is a gigantic cloud of gas, stretching over many thousands of light years inside dense clumps of dark matter. Inside these gas clumps, Gravity reigns supreme, collapsing huge chunks of gas into population III stars. This is the free fall stage where the central region of future galaxies begin to take form. During the local collapse another phenomenon is happening, due to the influence of other nearby proto-galaxies the gas acquires angular momentum, and the proto-galaxy flattens out into a disk where the density fluctuations will eventually form the spirals arms.
We have a timescale for the the formation of spiral galaxies. The oldest spiral galaxy ever discovered, photographed here by Hubble is 10.7 billion years old, so the formation processes is extremely quick. Well, in cosmic scales.