Performance/Fenix/Performance reviews: Difference between revisions

→‎Profile: Add more info to steps
(→‎Profile: add example time to display homescreen)
(→‎Profile: Add more info to steps)
Line 103: Line 103:


=== Example: time to display homescreen ===
=== Example: time to display homescreen ===
On a low-end device...
# 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 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 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 '''do a "warm up" run''' to populate the JIT's cache (the first run has unrepresentative perf). We start the app, open a tab, do our use case (click the home button and wait for the UI to fully load). 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 '''measure:''' 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 [https://share.firefox.dev/3odXiYR in the raw profile]. The most accurate and reproducible way to do this is using the Marker Chart.<br><br>In this case, we can identify the start point through the <code>dispatchTouchEvent ACTION_UP</code> marker, right-click it, and choose "Start selection here" to narrow the profile's timeline range.<br><br>The end point is more tricky: we don't have a marker to identify that the UI is visually complete. As such, we can use the information in the Marker Chart and Stack Chart to make a best guess as to when the UI is visually complete (notice that this creates a point of inaccuracy).
# 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.
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...
Confirmed users
975

edits