MozillaZine

Performance - Thunderbird

From MozillaZine Knowledge Base

(Difference between revisions)
Revision as of 13:38, 10 March 2012
Wsm (Talk | contribs)
(update direct2d, remove obsolete version 2 info, folder memory usage is due to the index not the folder itself)
<-- Previous diff
Revision as of 21:34, 11 April 2012
Tanstaafl (Talk | contribs)
(Problems - Test Pilot add-on)
Next diff -->
Line 4: Line 4:
* 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 [[Profile backup | 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, [[Profile backup | back up]] your profile, delete both the "Inbox." and "Inbox.msf" files for that account in your [[Profile folder | profile]] and then run Thunderbird again. It will create a new empty Inbox folder if you do that. * 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 [[Profile backup | 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, [[Profile backup | back up]] your profile, delete both the "Inbox." and "Inbox.msf" files for that account in your [[Profile folder | profile]] and then run Thunderbird again. It will create a new empty Inbox folder if you do that.
 +
 +* See if its due to an add-on by temporarily disabling all add-ons using "Help -> Restart with Add-ons Disabled". The Test Pilot add-on for example currently has a bug that causes performance problems. [https://bugzilla.mozilla.org/show_bug.cgi?id=741601]. The Lightning add-on can also slow performance.
* You might need to defragment the disk drive. * You might need to defragment the disk drive.
Line 12: Line 14:
* Thunderbird 5 through version 8 uses Direct2D hardware acceleration (disabled starting version 9), which can be disabled by setting '''gfx.direct2d.disabled true''' and '''layers.acceleration.disabled true''' using the [[Modify_Thunderbird_settings | config editor]]. If you are using Linux or OS X try setting '''layers.prefer-opengl true''' instead, to see if you can use OpenGL for the hardware acceleration instead. Normally you would use Direct2D under Windows and OpenGL under OS X and Linux. [http://forums.mozillazine.org/viewtopic.php?f=23&t=1775755] * Thunderbird 5 through version 8 uses Direct2D hardware acceleration (disabled starting version 9), which can be disabled by setting '''gfx.direct2d.disabled true''' and '''layers.acceleration.disabled true''' using the [[Modify_Thunderbird_settings | config editor]]. If you are using Linux or OS X try setting '''layers.prefer-opengl true''' instead, to see if you can use OpenGL for the hardware acceleration instead. Normally you would use Direct2D under Windows and OpenGL under OS X and Linux. [http://forums.mozillazine.org/viewtopic.php?f=23&t=1775755]
- 
-* The Lightning add-on can slow performance. Try disabling it and see if it makes a difference. 
* If you automatically check for updates it might time out if there is a problem with the Mozilla web site its using. The startup page also uses a web site. Visit http://status.mozilla.com/ to check the status of Mozilla's web sites. * If you automatically check for updates it might time out if there is a problem with the Mozilla web site its using. The startup page also uses a web site. Visit http://status.mozilla.com/ to check the status of Mozilla's web sites.

Revision as of 21:34, 11 April 2012

Contents

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, for example, that Thunderbird might be loading a large 100MB folder index when it displays the Inbox folder that actually has very few messages. (Compact is automatic starting in version 5)
  • 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.
  • See if its due to an add-on by temporarily disabling all add-ons using "Help -> Restart with Add-ons Disabled". The Test Pilot add-on for example currently has a bug that causes performance problems. [1]. The Lightning add-on can also slow performance.
  • You might need to defragment the disk drive.
  • Check that you have enough free physical memory so that applications aren't being slowed down by constantly being moved to/from the swap file. You can decrease swapping by reducing the number of running applications, and 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 normally increases performance, but sometimes it 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.
  • Thunderbird 5 through version 8 uses Direct2D hardware acceleration (disabled starting version 9), which can be disabled by setting gfx.direct2d.disabled true and layers.acceleration.disabled true using the config editor. If you are using Linux or OS X try setting layers.prefer-opengl true instead, to see if you can use OpenGL for the hardware acceleration instead. Normally you would use Direct2D under Windows and OpenGL under OS X and Linux. [2]
  • If you automatically check for updates it might time out if there is a problem with the Mozilla web site its using. The startup page also uses a web site. Visit http://status.mozilla.com/ to check the status of Mozilla's web sites.
  • There have been performance problems using profiles on a file share (NAS), which have been fixed for most users.

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 hundreds of 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.

Background processes

Global search ( Tools -> Options -> Advanced -> General -> Enable Global Search and Indexer) uses a background process to create a search index. If you have a IMAP account Thunderbird creates offline folders (Tools -> Account Settings -> Synchronization & Storage -> Keep messages for this account on this computer) that it downloads copies of all of your remote folders to in the background. The offline folders are useful for backup or reading messages when working offline (File -> Offline -> Work Offline).

If you are short of resources or Thunderbird doesn't respond quickly consider disabling both features. You can still search for messages without global search, you're just limited to searching within the current folder.

Thunderbird 3 also added a optional disk cache. It mainly caches remote images. If you don't re-read many HTML messages with remote images consider setting the space used by it to zero in Tools -> Options -> Advanced -> Network & Disk Space -> Disk Space. It doesn't pre-fetch images for messages you haven't read yet.

Memory

Thunderbird 3.* uses approximately 50MB within a couple minutes under Windows. If it keeps increasing or uses more than 75MB you probably have a memory leak. Thunderbird 5 and later uses much more memory. If it uses more than 150MB you probably have a memory leak. These are ballpark figures, the exact value depends upon your configuration, what version you're using, what operating system etc.

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 try running Thunderbird normally, selectively disabling each extension/theme until you identify the culprit(s). If not, see Testing memory usage problems

Setting config.trim_on_minimize to true will cause Thunderbird free most of its memory when you minimize it if you are running under Windows. It defaults to false, which speeds up restoring the window.

If you make a connection using a anti-spam proxy such as the free version of MailWasher or use a anti-virus scanner consider disabling checking for new messages in Thunderbird, setting View -> Message Body As -> Plain Text, temporarily disabling those programs, and then restarting Thunderbird to see what effect not using those proxies 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.

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