I have for long time a trouble with Thunderbird. Very often when I changed view to another folder, then Thunderbird freeze for a moment. Sometimes just few seconds. Sometimes nearly for one minute. This was really PITA. And I even considered other MTA, but none was good enough for me. Therefore everytime I was really pissed by this bug I gave $50 as bounty for this bug.
I tried a lot of suggestions (deleting some emails, disabling extension, repair the folders...) and yesterday I found the correct solution (provided by Wayne Mery). So if you experience the same issue, the solution is: Preferences -> Advanced -> Config Editor and set option mail.db.max_open
to 1000 - it should be definitelly higher than number of your folders.
This is example of power of Open Source - when you are unable to fix the issue yourself, then there is always somebody who can do that.