How long does flight planning take / when is it done / how is it done? 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
The pilots don't do the flight planning. It is done 1-2 hours before the flight by dispatchers using computer software.  

On a quick turnaround, one pilot goes to a printer to retrieve the flight plan. The other stays with the aircraft and prepares for the next flight.   

Sometimes someone will bring the flight plan directly to the aircraft. Some airlines have stopped using paper flight plans and instead download to an iPad. 

The pilots review the flight plan to ensure it meets all requirements, and can request a reroute, or additional fuel it they feel it is needed.