A number of users attempting to update to iOS 4.0.1 have reported problems updating, including “Error 9” and another issue in which the update stalls partway through.
Restore instead of update. Backup your iPhone, then perform a restore process instead of using the check for update function. This may allow the iPhone to successfully receive the iOS 4.0.1 update, after which sync processes should occur at normal speed.
Switch USB ports. Try switching your iPhone to a different USB port. In particular, if you are using a hub or other intermediary device, try connecting the device directly to your computer.
Disable network connection. In some cases, simply disabling your network connection (turning off AirPort or unplugging your Ethernet cable) right after the update starts will resolve the slow or stuck update. It appears that iTunes performs some data network data transfer during the backup process which can, for unknown reasons, take an extremely long time or become stalled.