Here's a shutdown profile http://bit.ly/2EeGEkH captured on today's nightly, zoomed on the unload event of the browser window. Indeed we no longer have any style flush there. I still see 2 unfortunate things in this profile: - we initialize SearchOneOffs (covered bug v1526374 already) - https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/browser/base/content/browser-sidebar.js#108 triggers the browser-sidebar.js _title lazy getter. And now about your direct question, to profile shutdown, from a terminal, cd into a directory that you can write to (eg. your home directory), then launch Firefox with the MOZ_PROFILER_SHUTDOWN="name-of-file" environment variable set. Quit Firefox After the shutdown is over, you'll find a name-of-file file in the current directory. Load https://profiler.firefox.com in a Firefox tab and drop this file onto it. The profile currently won't have symbols, if you are using an official build (eg. a nightly), you can fix this (force symbolication) by using https://deploy-preview-1522--perf-html.netlify.com/ instead of https://profiler.firefox.com
Bug 1526340 Comment 6 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Here's a shutdown profile http://bit.ly/2EeGEkH captured on today's nightly, zoomed on the unload event of the browser window. Indeed we no longer have any style flush there. I still see 2 unfortunate things in this profile: - we initialize SearchOneOffs (covered by bug 1526374 already) - https://searchfox.org/mozilla-central/rev/dc0adc07db3df9431a0876156f50c65d580010cb/browser/base/content/browser-sidebar.js#108 triggers the browser-sidebar.js _title lazy getter. And now about your direct question, to profile shutdown, from a terminal, cd into a directory that you can write to (eg. your home directory), then launch Firefox with the MOZ_PROFILER_SHUTDOWN="name-of-file" environment variable set. Quit Firefox After the shutdown is over, you'll find a name-of-file file in the current directory. Load https://profiler.firefox.com in a Firefox tab and drop this file onto it. The profile currently won't have symbols, if you are using an official build (eg. a nightly), you can fix this (force symbolication) by using https://deploy-preview-1522--perf-html.netlify.com/ instead of https://profiler.firefox.com