Did you just reset the factory defaults or wipe the entire hard drive and reload the operating system? I'd reload the operating system. If it's still borked after that, you may have a bad sector in your RAM. New RAM is cheap and easy to install.

I googled the problem and here's some interesting results:

Slow startup after system restore

Curious case - New computer running very slow even after system restore. - Tech Support Forum