I'd been tormented with an excruciatingly slow 2009 27" iMac. It got so bad that I grabbed a Chromebook (Dell 13 / 7310- loving it) to hold me until I figured out a cure. (In the past, I would have simply upgraded, but suffice to say Apple's quality control issues make me very hesitant.)
I tried innumerable alleged fixes, none a thrill. At some point, I ran across a discussion about a freebie app I'd forgotten about: Onyx. The article suggested retaining all the defaults, then just run the app. I did so one evening, walked away, and returned the following day. I am AMAZED at the change. The spinning wheel is gone; apps respond immediately to commands; even Safari is playing Speedy Gonzalez. Because I know the pain of a crawling machine, I'm compelled to share my experience. No down side. It's been 3 weeks, and I'm still a happy camper.