My default these days is to come in the night before if I have a long-haul departure on separate tix. I've done many same day transits in the past in this situation, and never had worse than a very close call (due to a BART stoppage that trapped me just outside of Daly City), but it's just not worth the stress to me anymore. My rule was minimum 3 hours between flights (which I did not always follow).