Complex sentence: Desprez became a close friend of Carte's and worked with him for many years as secretary whilst, at the same time, writing the texts for the little operettas that preceded the Gilbert and Sullivan shows on the bills at the Opera Comique and the Savoy Theatre.
Split into simpler sentences: Desprez became a close friend of Carte's and worked with him for many years as secretary. At the same time, he wrote the texts for the short works that preceded the Gilbert and Sullivan operas on the bills at the Opera Comique and later the Savoy Theatre.