In Woody Allen, The Art of Humor No. 1, the interviewer asks him about his process. He talks about how he used to write fifty jokes a day while riding the subway.
When I was sixteen years old I got my first job. It was as a comedy writer for an advertising agency in New York. I would come into this advertising agency every single day after school and I would write jokes for them. They would attribute these jokes to their clients and put them in the newspaper columns. I would get on the subway—the train quite crowded—and, straphanging, I’d take out a pencil and by the time I’d gotten out I’d have written forty or fifty jokes . . . fifty jokes a day for years. People would say to me, I don’t believe it—fifty jokes a day and writing them on the train. Believe me, it was no big deal. Whereas I’ll look at someone who can compose a piece of music—I don’t know how they ever begin or end or what! But because I could always write, it was nothing.
He also talks about the tenuous relationship between how long you work on something and how funny it is:
I’ve written on legal pads, hotel stationery, anything I can get my hands on. I have no finickiness about anything like that. I write in hotel rooms, in my house, with other people around, on matchbooks. I have no problems with it—to the meager limits that I can do it. There have been stories where I’ve just sat down at the typewriter and typed straight through beginning to end. There are some New Yorker pieces I’ve written out in forty minutes time. And there are other things I’ve just struggled and agonized over for weeks and weeks. It’s very haphazard. Take two movies—one movie that was not critically successful was A Midsummer Night’s Sex Comedy. I wrote that thing in no time. It just came out in six days—everything in perfect shape. I did it, and it was not well received. Whereas Annie Hall was just endless—totally changing things. There was as much material on the cutting-room floor as there was in the picture—I went back five times to reshoot. And it was well received. On the other hand, the exact opposite has happened to me where I’ve done things that just flowed easily and were very well received. And things I agonized over were not. I’ve found no correlation at all. But, if you can do it, it’s not really very hard . . . nor is it as tremendous an achievement as one who can’t do it thinks.
What I've noticed: The longer I work on something, the more fussed over it seems. And a lot of times, that's the opposite of funny.
It always amuses me when I show up somewhere with a bunch of new material that I worked on for a while but the only thing that winds up worth keeping comes from a riff on something that happened in the room. Happens all the time too.