Profiling Thunderbird Performance

Creating a performance profile can be useful for developers to find the causes of high CPU load or slowness in Thunderbird. We will be using Firefox's performance profiler. You will only need to refer to the Firefox profiler documentation if you have trouble or want to do something special, such as profiling startup performance. In the documentation, anywhere 'Firefox' is mentioned, think 'Thunderbird'.

Note: None of your private information is shared by default. Performance profiles which you capture and chose to share publicly do NOT contain personally identifiable nor private information unless you explicitly opt in to sharing such additional information.

Step 1 - Preparing performance recording in Thunderbird

The performance recorder is part of the Developer Toolbox in Thunderbird.

Before you start your recording, prepare as much as possible the scenario which you want to test in Thunderbird.

  1. In Thunderbird’s main window, open the Developer Toolbox: Press Ctrl + Shift + ICommand + Shift + I, or click on > Tools > Developer Tools > Developer Toolbox.
  2. Important: Confirm the warning prompt Incoming Connection ... Allow connection? with OK so that the toolbox can connect to your Thunderbird application. Note: The prompt might be hidden behind other Thunderbird windows.
  3. The Developer Tools window is shown.
  4. Current versions of Thunderbird will show the Performance tab with Start recording shown. If you do not see that tab, then press F1, or click on the ••• button in the top-right corner, then click on Settings. Ensure that [✓] Performance is checked. Then click on the Performance tab that has appeared at the top of the toolbox.
  5. Configure profiler settings:
    1. Click "edit settings" which is the last item in the Developer Tools window.
    2. Select the "Thunderbird" preset, if it isn't already. (If you are using nightly/trunk builds, select the "Daily" preset.)
    3. Scroll down and also mark the checkbox for "All File IO".
    4. Change any other settings that might be needed. For example, if you expect to need a very long sample, longer than a minute, you might need to increase the buffer size from 1GB to 2GB, or reduce the sample interval to less than 1ms.
    5. Close the settings window.
  6. Important: Before starting your performance recording, go back to the main Thunderbird window, and finish preparing the performance scenario to be recorded.

Step 2 - Recording a performance profile

You are now ready to record and save the performance profile of your scenario. Unless told otherwise, try to keep your recording as short as possible by recording only the exact set of actions which are suspected to cause the problem.

  1. In the Performance tab of the Developer Tools window, click on the Start Recording button.
  2. Without delay, go back to the main Thunderbird window and perform the set of actions you want to record.
  3. Once finished, immediately select Stop Recording in the Developer Tools window.

Step 3 - Saving and sharing a performance profile

  1. Click Capture recording to finish the collection process and you will briefly see Capturing profile, ending with a Firefox Profiler window. If you did not see the capture button then you are using an older version of Thunderbird ad profiler. Skip to the section on Old Versions of Thunderbird.
  2. Click Upload local Profile. For the profile which you are preparing to share, check the boxes for items which you wish to share your private information.
    Note: The profile does NOT contain personally identifiable nor private information unless you explicitly opt in to sharing such additional information.
  3. Scroll down if necessary to do Download for saving a local json file, or Upload to send the profile to a repository at https://profiler.firefox.com/. Upload will provide a permalink in the form of https://share.firefox.dev/ which you can copy and share with developers and others who might help you with your problem.
  4. Close the Performance Profiler window.
  5. Close the Developers Tools window.

Old versions of Thunderbird

Older versions of Thunderbird require some manual steps to save the profile.

  1. On the left side, right next to the new Recording #1 item, click the Save link and save the file to somewhere on your computer. The file extension must be .json.
  2. Go to https://profiler.firefox.com/ (yes, on firefox.com).
  3. Select Load a profile from file and select the .json file which you just saved for upload.
  4. Important: Near the top-right, select the green Publish button, then in the Share Performance Profile panel, select the (blue) Publish button again.
  5. Copy the link (e.g. https://share.firefox.dev/1XYZXYz) which pops up in the top-right corner under the new permalink button and paste it into an appropriate new bug or existing bug on Bugzilla (BMO).
  6. Finally, back in the Developer Tools Performance tab, you can delete the performance profile using the trash-icon just above the profile list in the left-top corner (where you saved the profile), and then close the Developer Tools window.

Profiling Thunderbird startup and shutdown

Profiling startup or shutdown involves special, but very simple instructions. Again, where 'Firefox' is mentioned, think 'Thunderbird'.

Was this article helpful?

Please wait...

These fine people helped write this article:

Illustration of hands

Volunteer

Grow and share your expertise with others. Answer questions and improve our knowledge base.

Learn More