Are you using CWM recovery? If so, if you ever get stuck at the boot screen, try running the Recovery Boot Loop fix. It's helped me before even when it wasn't automatically going into the recovery. Also, I've had times where the phone would do the first boot in like 30 seconds, and times where the first boot would take 5 minutes. I still suggest wiping data as well as cache, but not formatting /system when upgrading from 317 to 327. Also, I'm not sure if it helped me or not, but make sure if you are using CWMR that you have the newest version installed (1.2518.6).