Thunderbird delete Performance - Inbox Folders

If you have performance issues in Thunderbird when deleting messages in Inbox (sub)folders then this may be a fix for you: Do not use Inbox subfolders. Move them out.

The mozillaZine wiki Thunderbird Performance page says:

Thunderbird appears to parse the contents of the entire Inbox folder when it downloads new mail for POP accounts. If the folder contains messages with certain missing headers (typically due to spam or a corrupted folder) it can get caught in a loop. The workaround (after first backing up your profile folder!) would be to move all of the Inbox folders messages to another folder (where you can identify and delete the troublesome messages later on) and compact the Inbox. In the worst case you might need to copy the messages in your Inbox to another folder, exit Thunderbird, back up your profile, delete both the “Inbox.” and “Inbox.msf” files for that account in your profile and then run Thunderbird again. It will create a new empty Inbox folder if you do that.

Not really specific to my use case with IMAP, Inbox.msf has been replaced by global-messages-db.sqlite, numerous emails, and moving folders works just fine, but it did solve my issue.

I was using subfolders in my Inbox folder for categorizing emails that were not done/handled yet, moving them to archive subfolders once they were.

I have had performance issues for a long time deleting messages. Deleting a message took 2-3 seconds. Deleting a conversation (grouped messages) basically locked up Thunderbird for good (3s * message count?) and offered to “stop the script” slowing down Thunderbird. (Of course stopping the central delete functionality script breaks the Thunderbird instance for good, leaving only a kill and start it again.)

Apparently the Inbox folder is handled differently. Or maybe it’s just that numerous messages have been split off into a separate top-level folder.

My global-messages-db.sqlite messages database file is 110 MB, so it’s quite big with quite a lot of messages. I was thinking it was because of this and some inadequate program logic inside Thunderbird (which it is; but with a workaround).