I try to avoid riding on the sidewalk whenever possible. For the purposes of avoiding traffic jams, I only do it if the traffic jam is really really long, and impossible to filter/lane-split through. Even then I usually only ride the sidewalk to the closest intersection, and then turn off the jammed up road and go for parallel routes. That only happens to me maybe once in three months or so (in general I do ride on the sidewalks more often than that, but for other reasons, such as to bypass construction or to avoid doing two left turns in quick succession).
In a situation when I know a road is likely going to be backed up for a long stretch, I'd probably just ride the parallel street by default. If it's going to piss off motorists... oh well. You can't avoid pissing off North American motorists; they're such an irritable bunch!
BTW, as others asked, can you split lanes? Often there is not enough space between the curb and the cars in the curb lane, but there is sufficient space between the two lanes of cars.
Waiting is an option too, of course, but I won't condemn any cyclist for not wanting to wait in a half-mile long jam.

Even if you're in no hurry, you'll have to sit there breathing in exhaust fumes.