Confirmed users
975
edits
(→Timestamp benchmark: Put non-UI recommendations higher towards the top) |
(→Profile: add example time to display homescreen) |
||
Line 98: | Line 98: | ||
== Profile == | == Profile == | ||
You can [https://profiler.firefox.com/docs/#/./guide-remote-profiling take profiles with the Firefox Profiler], identify the start and end points for the duration you're measuring in your profile, and use the difference between them to measure the duration. It's quick to take these profiles but there are big downsides: profilers add overhead so the duration will not be precise, it's difficult to avoid noise in the results because devs will only take a few profiles, and it may non-trivial to correctly identify the start and end points of the duration especially when | You can [https://profiler.firefox.com/docs/#/./guide-remote-profiling take profiles with the Firefox Profiler], identify the start and end points for the duration you're measuring in your profile, and use the difference between them to measure the duration. It's quick to take these profiles but there are big downsides: profilers add overhead so the duration will not be precise, it's difficult to avoid noise in the results because devs will only take a few profiles, and it may be non-trivial to correctly identify the start and end points of the duration especially when the implementations you compare have big differences. | ||
Follow the example below to see how to measure the change in duration for a change with profiles. | |||
=== Example: time to display homescreen === | |||
# We pick the specific duration we want to measure: the time from hitting the home button when a tab is open until the homescreen is visually complete. | |||
# We build & install a '''release build''' (e.g. Nightly, Beta; debug builds have unrepresentative perf). You can also use a recent Nightly, like this example does. | |||
# We do a "warm up" run to populate the JIT's cache (the first run has unrepresentative perf). We start the app, open a tab, (our use case) click the home button and wait for the UI to populate. Then we force-stop the app. | |||
# We start the app (which should launch to the most recent tab), start the profiler (see [https://profiler.firefox.com/docs/#/./guide-remote-profiling here for instructions]), perform the use case (click the home button in the toolbar and wait for the homescreen to finish loading), and stop the profiler. If necessary, we enable the profiler (3-dot menu -> Settings -> Remote debugging via USB). | |||
. | |||
# We identify the duration of the change in the profile. | |||
Repeat these steps for the change and compare the resulting times. It's possible these profiles were impacted by the device doing something in the background so you may wish to take more than one profile if you suspect that is the case. | |||
TODO markers... |