One of the cornerstones of gauge theory and complex geometry in the late 20th century was the so-called "Kobayashi-Hitchin correspondence", which provides a link between Hermitian-Yang-Mills connections (gauge theory) and stable holomorphic structures (complex geometry) on a vector bundle over projective (or merely Kähler) manifold. On the one hand, this gives an identification of (non-compact) moduli spaces. On the other, one proof of the correspondence goes through a natural parabolic (up to gauge) flow called Yang-Mills flow. Namely, Donaldson proved the convergence of this flow to an Hermitian-Yang-Mills connection in the case that the initial holomorphic structure is stable. Two questions that this leaves open are: 1. Do the moduli spaces admit compactifications, and if so what sort of structure do they have? Are they for example complex spaces? Complex projective? What is the relationship between the compactifications on each side? 2. What is the behaviour of the flow at infinity in the case when the initial holomorphic structure is unstable? I will touch on aspects of my previous work on these problems and explain how they connect up with each other. This work is spread out over several papers, and is partly joint work with Richard Wentworth, and with Daniel Greb, Matei Toma, and Richard Wentworth.