Open Bug 1747080 Opened 3 years ago Updated 3 years ago

Investigate adding the profiler toolbar button to Thunderbird

Categories

(Thunderbird :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: standard8, Unassigned)

References

Details

The profiler toolbar button is the supported way to run the Firefox profiler - running via the browser toolbox can cause additional issues (xref bug 1746970 comment 2).

It would therefore be good to investigate adding the button to Thunderbird directly, so that we can take more reliable profiles easily.

Julien, could you give us some pointers for what would need to be implemented?

Flags: needinfo?(felash)

Sure, I can give some pointers!

The menu button is implemented in this file: https://searchfox.org/mozilla-central/source/devtools/client/performance-new/popup/menu-button.jsm.js#323

You can search ProfilerMenuButton in searchfox to see where it's being added or used. Especially it will be added automatically when the user goes to profiler.firefox.com and click the big button, as a result of this code: https://searchfox.org/mozilla-central/rev/b605f01915c5704a55e9f485101b7be7d20a55df/devtools/client/performance-new/popup/background.jsm.js#686-718

Which makes me think... maybe simply the pref devtools.performance.popup.feature-flag (see https://searchfox.org/mozilla-central/source/modules/libpref/init/all.js#867-875) is disabled in thunderbird, and enabling it would make the profiler button available in the customize panel?

Flags: needinfo?(felash)

I took a few moments to try this out with the latest comm-central code for Thunderbird, and found a few things:

  • devtools.performance.popup.feature-flag is already set to true for Thunderbird.
  • DevToolsStartup.jsm has a lot of Firefox based assumptions about where menu items are.
  • Thunderbird doesn't currently fire browser-delayed-startup-finished (which may cause other issues with toolkit components as well, it does fire mail-delayed-startup-finished but that doesn't appear to be tracked).

Even with workarounds for the above, the button still doesn't appear on the customise dialog as an option. I'm vaguely wondering if this could be to do with Thunderbird using an older version of CustomizableUI, but I can't see a difference in the createWidget API that would affect it.

You need to log in before you can comment on or make changes to this bug.