High CPU usage in Mail process after deleting many emails
I've had this happen a few times now. I have two Gmail accounts in Apple Mail on my MacBook Air (10.15.7). I decided to cleanup my email by deleting everything in my Junk folders. After deleting a probably a few hundred emails, the Mail process spikes the CPU, and displays messages such as "Moving 1 of 10 messages" at the bottom of the folder pane. Figuring it just had a bunch of cleanup to do, I left it alone and running for several days, but it never completes and the CPU usage stays high.
I fired up the Console app and noticed that the Mail is endlessly spewing messages like the ones supplied in the Additional Text.
I went to Preferences\Accounts and unchecked the two Gmail accounts, and that stopped the issue. But re-enabling the accounts brought the issue right back. The only 'solution' I've found is to delete the accounts and re-add them.
I suspect it's a bug in the Mail app when deleting lots of messages. Hoping someone here can maybe confirm this based on the console messages.
MacBook