I read Groucho's autobiography, he said their first four films were Broadway shows for about a year before filming. When they got to filming they'd honed all the jokes and slapstick routines.
I recommend reading both Groucho and Harpo's autobiographies. There's a lot of interesting stories about them, vaudeville, and their family.