I think it does most of the variables once per frame, some things per view or object if there is a material event.
Dont bother worrying, even if the engine pases in those variables, this is very fast as it is not a hardware state change... so basically it wont make any difference either way.
Something you should avoid however is constantly chnageing the texture in a material event, like if you render 50 trees, you shouldnt chnage the material texture for each one in a material event.. this is a state chnage and can be costly if done enough times.