I tried turning off spotlight (which was taking a very long time to complete) but it did not help.
For me, the problem turned out to be a failing hard drive. After replacing my system hard drive, things returned to normal speed.
I'm just posting this in case it might help someone else.
My friend had installed a new larger drive that was causing the problem, whereas there were no beach balls while booting off the original drive via USB.