Ever wondered why building Firefox takes so long? You can now visualize the answer!
As of last week, clicking any Firefox build job on treeherder shows a big « Open in Firefox Profiler » grey button. Clicking it opens a profile of the build in a Firefox Profiler tab. The profile contains both a sampling of resource use (CPU, memory, disk I/O) and markers indicating what the build was doing at any time.
This makes it really easy to understand which parts of the build were multi-threaded and which parts of the build were not taking advantage of the available cores.
For your local builds, after `mach build` finishes, you can run `mach resource-usage` to open a profile in a Firefox tab.
Many thanks to glandium who helped me land and polish this over the last few days.
I hope this will help make our builds faster!