Worst US airport going for immigration in my opinion.
I've had 20 minutes through to a couple of hours there before.
Even with Global Entry, it can take up to 40 mins if you arrive at say 9pm onwards as the TSA go at a dead snail's pace and can take up to half an hour to log in, sit down etc.
Experiences do vary though even with queues - it's all down to the TSA on the day.
LAX, 20 secs.
ORD, not far off that.
Both have a decent walk to immigration though.....easy 10k steps!
I prefer to connect at JFK i.e. fly SFO-LAX and then go international rather than arrive there from the UK.