For pork, I can't tell much difference between overnight, a few hours before, or right before it goes on the smoker. So these days I fire up the smoker and as it is settling in I trim and rub the pork, then throw it on the smoker. Sometimes overnight rubs with salt do give a bit of a hammy taste. Also sometimes the meat is packed with a high sodium content preserving liquid that can give it a hammy taste that isn't your fault. The worst ones I have found for this is the Tyson brand pork at wal mart.
Beef and chicken get treated differently, this is just for pork.
XL Big Green Egg, Weber Performer Platinum, WSM 22.5"