There's a wonderfully ironic moment in Mike Leigh's "Topsy-Turvy," a creaking, unfocused period piece about the noteworthy partnership between Gilbert and Sullivan: Gilbert's dentist, his hand in the librettist's mouth, confides that he and the wife found his patient's new operetta, "Princess Ida," amusing but overlong.

One wonders whether Leigh meant this as an inside joke, for his latest work, a lavish showcase for the partners' frolicsome tunes, clocks in at nearly three hours. Surely the movie provides more information than anyone, except for G&S buffs, could possibly want to know about the Victorian antecedents of Andrew Lloyd Webber.

The project is an unusual one for Leigh, who in such films as "Secrets and Lies" usually portrays the struggles of the working class. William Gilbert (Jim Broadbent) and Sir Arthur Sullivan (Allan Corduner) were wealthy men, but their lives offstage seem to have been screwed up enough to attract his interest. The first half of the movie transports us back to London in 1884 for the unsuccessful premiere of "Princess Ida." The critic for the Times of London finds the libretto rather stale and goes on to enrage Gilbert by crowning him "the king of Topsy-Turvydom."

Sullivan, on the other hand, quite agrees with the Times's assessment, for he too is weary of Gilbert's recycled tales of magic potions and society turned on its head. In fact, he wants to quit the partnership to compose serious music. The first half of the picture is mired in the pair's disintegrating relationship.

Then Gilbert's wife (Lesley Manville) drags her husband to an exhibition of Japanese culture, and voila, "The Mikado" is born. Suddenly the dawdling bio-pic gives way to that hokey genre best described as "Hey, kids, let's put on a show!"

Though the composer is as unrepressed as his partner is rigid--his sex life is well documented--Corduner's Sullivan comes off as the blander of the duo. Broadbent, one of Leigh's frequent collaborators, towers over the rest of the cast as the fussbudget Gilbert. Among the supporting players, Shirley Henderson is memorable as a boozing soprano, and Timothy Spall, one of Leigh's regulars, is both genuine and moving as a baritone who's devastated when Gilbert threatens to cut the title number from the production. But not to worry--much of "The Mikado" is performed, either in rehearsals or on opening night.

Which is a triumph. And please, no phone calls for giving that away.

Topsy-Turvy (160 minutes, at the Cineplex Odeon Avalon) is rated R for sexuality and nudity.