This is not an avast issue - it is an issue with Thunderbird.
Thunderbird does not manage disk space used by the mail folders well and they can become very large (which means they take longer to scan).
For example - deleted messages are not removed from a mail folder (they are simply flagged as not to be shown). So it is essential that you emtpy the trash folder(s) and you need to compact all of the folders to actually remove any deleted messages and release the wasted disk space.
If in Thunderbird you go Tools > Options > Advanced > Offline & Disk space tab
you will find a box that can be checked to compact all folders when there is a specified level of disk space to be recovered.
It will also help if you do not keep all of your mail in the Inbox forever - move it to another folder if you wish to keep it, but remember the old copy will still be in the Inbox folder until you compact it.