I do have a somewhat unusual set-up, but I have factored that out of the equation, and got some insight in what is causing the slow down. My setup is as follows:
- I'm using the latest Thunderbird (78.9.0, 32 bit) on Windows 10 (latest updates installed).
- Thunderbird is installed on my main SSD drive.
- My profile is located on my secondary platter drive.
- All email is stored on IMAP servers.
- I have a few extensions installed.
- I have split off the Mail folder from my main profile folder, and placed it next to it. So I have a "Thunderbird data" folder, with in it a "Mail" subfolder and a "Profile" subfolder. My profile points at the "Thunderbird data" folder.
- The entire "Thunderbird data" folder is stored in a Cryptomator vault to encrypt it when at rest and in the backups.
- Individual archived mail files live all over the place in loose .eml files.
- The whole thing is running in a Sandboxie sandbox.
- Windows Defender is active too.
I mention this because when researching this I saw others having trouble with this too while others did not, and all sorts of fixes got suggested like turning off sample submission etc. All of these didn't work for me, only whitelisting the mail folder did. Whitelisting the profile folder didn't have any effect. So it must be something related to mail files getting scanned over and over; maybe this suggests Thunderbird is not efficiently open-read-closing them in one go, but re-opens or re-queries these files very frequently, each time triggering another rescan? Which leads me to the following:
The real issue (opening eml files) seems to boil down to the following:
- Disabling Windows Defender doesn't make a change.
- Running Thunderbird outside Sandboxie doesn't make a change.
- Disabling all add-ons by starting Thunderbird in safe mode doesn't make a change.
- Moving the profile folder outside of it's Cryptomator vault does make a HUGE change; opening eml files is almost instantaneous again.
When an external eml file is opened, Thunderbird starts scanning my mail folder, and iterates over each mailbox file (about 600) and .sbd folder (about 40), opening it, asking for file properties and date/time stamps, and then immediately closing it, over and over and over again. The log uses quite a few lines per file action (about 20, then again for each file it asks for the information twice in a row), but the log is actually 1.9 million lines long when the .eml file finally is open... That amounts to about 150 queries for each .sdb folder and mailbox file. And that's why Cryptomator crawls to a halt; it is asked to decrypt all these files over and over again -- according to it's own stats, after this ordeal it had decoded 12GB worth of data.
What could be going on??? Why is Thunderbird even scanning my mail folder when opening an external .eml file? And, no, "stop using Cryptomator" is not a solution
I have this log stored locally if any developer is interested in taking a peek. It is about 10MB zipped. I'm hesitant to attach the log file here since it contains quite a lot of folder names I do not want to expose, and anonymizing the log file is undoable.
The following is an excerpt from the log dealing with one mailbox file. There are thus a gazillion of these blocks in the log, and the below file is re-queries a few seconds later again. And again.
Code: Select all
20:14:12.445 zwCreateFile() is called for /Mail/folder1 with the following parameters:
CreateDisposition -- OPEN_EXISTING
createOptions -- []
accessMasks -- []
fileAccessMasks -- []
fileAttributes -- [].
20:14:12.445 Try to open /Mail/folder1 as File.
20:14:12.445 Reading file header from D:\App data\Cryptomator self\Thunderbird\d\NH\JO3NEOEV47J5SBG6X26KZG5HWKO6CT\QOicxipX66ar1kiKViw38jhLYPQA5tPs8Z-A3yU=.c9r
20:14:12.445 First channel for this openFile. Initializing file size...
20:14:12.445 (81601) /Mail/folder1 opened successful with handle 81601.
20:14:12.446 (81601) getFileInformation() is called for /Mail/folder1.
20:14:12.446 (81601) Filesize of /Mail/folder1 is 111181.
20:14:12.446 Timestamps for /Mail/folder1: mTime 1594500792487 cTime 1613665339718 aTime 1617300852446
20:14:12.446 (81601) File Information successful read from /Mail/folder1.
20:14:12.446 (81601) getFileInformation() is called for /Mail/folder1.
20:14:12.446 (81601) Filesize of /Mail/folder1 is 111181.
20:14:12.446 Timestamps for /Mail/folder1: mTime 1594500792487 cTime 1613665339718 aTime 1617300852446
20:14:12.446 (81601) File Information successful read from /Mail/folder1.
20:14:12.446 (81601) cleanup() is called for /Mail/folder1.
20:14:12.447 (81601) closeFile() is called for /Mail/folder1.