Phone boots very slow and restarts by itself
After flashing a new firmware it is advised to perform a factory reset (all your data will be lost, so take a backup.) While the phone is off:


Press the VOLUME UP, HOME and POWER buttons together till it vibrates. Now it has entered RECOVERY MODE.
Navigating using the volume buttons highlight the option wipe data/factory reset and press the HOME button to select and confirm it on the next screen.
Finally select reboot system now to restart the phone