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'.
Table of Contents
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.
- In Thunderbird’s main window, open the Developer Toolbox: Press Ctrl + Shift + ICommand + Shift + I, or click on > > .
- 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.
- The Developer Tools window is shown.
- Current versions of Thunderbird will show the Performance tab with F1, or click on the button in the top-right corner, then click on . Ensure that is checked. Then click on the tab that has appeared at the top of the toolbox. shown. If you do not see that tab, then press
- Configure profiler settings:
- The about:profiling window is shown.
- Click "edit settings" which is the last item in the Developer Tools window.
- Select the "Thunderbird" preset, if it isn't already. (If you are using nightly/trunk builds, select the "Daily" preset.)
- Scroll down and also mark the checkbox for "All File IO".
- 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.
- Close the about:profiling window.
- 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.
- In the tab of the Developer Tools window, click on the button.
- Without delay, go back to the main Thunderbird window and perform the set of actions you want to record.
- Once finished, immediately select in the Developer Tools window.
Step 3 - Saving and sharing a performance profile
- Click Old Versions of Thunderbird. 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
- Click Note: The profile does NOT contain personally identifiable nor private information unless you explicitly opt in to sharing such additional information. . For the profile which you are preparing to share, check the boxes for items which you wish to share your private information.
- Scroll down if necessary to do 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. for saving a local json file, or to send the profile to a repository at
- Close the Performance Profiler window.
- Close the Developers Tools window.
Old versions of Thunderbird
Older versions of Thunderbird require some manual steps to save the profile.
- 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.
- Go to https://profiler.firefox.com/ (yes, on firefox.com).
- Select and select the .json file which you just saved for upload.
- Important: Near the top-right, select the green button, then in the Share Performance Profile panel, select the (blue) button again.
- Copy the link (e.g. https://share.firefox.dev/1XYZXYz) which pops up in the top-right corner under the new new bug or existing bug on Bugzilla (BMO). button and paste it into an appropriate
- Finally, back in the Developer Tools 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'.