Society widely considers it polite to hold doors open for people as they walk through the door. We consider it such an inherently kind act that not offering thanks to the door holder is considered highly rude.
But just because society considers this a kind act does not make it so--society has been wrong before and will be wrong again. And, some critics have wisely pointed out that if you hold the door open for somebody who is a long distance away, you make them feel guilty and awkward. So the altruist now has to correctly estimate both the distance and speed of the walker, and factor that into his decision to hold the door open.
But the true altruist can do even better. If you anticipate that somebody behind you will be at that awkward distance where you don't want to open the door, you should slow down so that they will reach the door just after you enter. Pretend to check your cell phone, retie your shoes, itch your scalp--just make sure that it is timely and surreptitious.
At some point you will still have to decide if slowing down to hold the door is worth your time as an altruist. Remember that altruism comes in many flavors, be it sending aid to impoverished nations, developing a cure for a disease, or sitting at your computer writing a blog post about altruism that will be read around the world.