Michael, I’ve had the Sanebox/SpamSieve script running for at least a year. In recent months when the script is running (as indicated by the spinning gear in the menu bar) I get a spinning beachball 100% of the time. I don’t think that it has always been this way but maybe I just put up with it. Have any other users experienced this?
I’ve seen that before when there are lots of messages (sometimes invisible) in the relevant mailboxes, and it takes a Mail a long time to process them. I suggest editing the script to change pEnableDebugLogging to true. Then you can run the script in Script Editor and see some information logged to Console about how many messages it’s seeing.