Efficient multi-Gaussian expansion of galaxies