Performance - Thunderbird

From MozillaZine Knowledge Base
Revision as of 22:05, 28 November 2007 by Tanstaafl (talk | contribs) (typo in link)
Jump to navigationJump to search

Problems

Most performance problems are due to not compacting the Inbox folder often enough. Deleted messages aren't physically deleted until the folder is compacted; they are merely hidden from view and marked for deletion. This means it might be loading a 1GB file when it displays an Inbox folder that appears to have only 50KB of messages.

Thunderbird appears to parse the contents of the entire Inbox folder when it fetches and stores 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.

You might also defragment the drive and check that you have enough free memory that applications aren't being slowed down by constantly being moved to/from the swap file. You can decrease the amount of swapping by reducing the number of applications you're running and/or the number of programs in your system tray. It might also help to set the minimum and maximum size of the swap file to the same value.

Thunderbird uses an "xul.mfl" file in the profile to cache some of the data for the user interface. This is supposed to increase performance but sometimes that can get corrupted/bloated, and make things worse. The workaround is to exit Thunderbird and delete that file. Thunderbird will create a new one the next time you run it.

Why it's slower than the competition

Many Windows e-mail clients call the operating system (win32 API) to display the GUI, or call some wrapper that adds no significant overhead. Thunderbird uses XUL (Mozilla's XML-based User-interface Language) to display its GUI. This decreases performance but it allows users to write XUL extensions to extend the functionality, rather than having to write traditional plug-ins or ActiveX controls. There are over a hundred extensions available, most written by users.

Tweaking

There is a project to preload Firefox but there doesn't appear to be an equivalent for Thunderbird yet.

Memory

Thunderbird will use approximately 25MB when started, and then increase to approximately 35MB - 40MB within a couple minutes under Windows. These are ballpark figures, the exact value depends upon your configuration, what version you're using, what operating system etc.

If it keeps steadily increasing (over a long period of time while you're doing nothing) or reaches 75MB you probably have a memory leak. Try running Thunderbird in safe mode (not to be confused with Windows safe mode) to temporarily disable any added extensions and themes. If that works around the problem then you can try running Thunderbird normally, selectively disabling each extension/theme until you identify the culprit(s).

With v1.5RC2 and later under Windows you can set config.trim_on_minimize to false to have Thunderbird free most of its memory when you minimize it.

If you make a connection using a anti-spam proxy such as the free version of MailWasher or use a anti-virus scanner you could also try disabling checking for new messages in Thunderbird, temporarily disabling those programs, and then restarting Thunderbird to see what effect that has. Tools such as Process Explorer provide more detailed information than Task Manager, and can be useful when trying to figure out exactly what is going on.

Firefox is well known for having memory leaks (in itself, not just the extensions/themes). Thunderbird doesn't seem to be as susceptible. If you're using a localized, third party or nightly build try installing the default (english-US) build from the Mozilla web site in a different location and see if it has the same problem. It should automatically use the same profile, and you can use whichever one you want (though you can't run them simultaneously).

How many accounts you have, the number of messages in the current folder, whether Thunderbird is configured to open new messages in an existing window, and are you using POP or IMAP accounts has some effect, but typically shouldn't cause a major problem. However, reducing the number of messages you keep in your inbox folder should improve the startup speed, help reduce the chance for corruption (if you regularly compact your folders) and decrease your memory usage.

See also

External links