When I left an A320 today, the fuel truck was already there and refueling the aircraft. (At least, the hose was connected.) Also, a FA said they will fly back within 40 minutes.

This isn't much time, and I wonder if they start to refuel the aircraft before actually calculating the required amount. (Since it's a 4h flight, they'll need quite some fuel.)

So I'd like to know how much time is needed for flight planning of an airliner. Maybe some planning for the next flight can already be done in advance during the current flight? Maybe some part can already be done by others? Or does the entire process take just a few minutes today?

It's also not clear to me what is done during flight planning. Of course planning the route, including possible ways to divert the aircraft, and amount of fuel. What else?

**EDIT:** To make it more clear: I'm asking about the work the pilots have to do to prepare for the next flight