Changes

Jump to: navigation, search

Performance/Fenix

2,453 bytes removed, 15:48, 17 August 2021
Critical flows: Remove section
* [[Performance/Fenix/Best Practices|Best Practices]] for tips to write performant code
* [[Performance/Fenix/Getting Started|Getting Started]] for comparison of profiling and benchmarking tools
 
== Critical flows ==
Any areas of the app where users might retain significantly less if performance regressed are considered to be '''critical flows'''. For example, if pages took twice as long to load, we might expect to see some users stop using the app.
 
When analyzing a critical flow for performance issues, it's essential to know what code is relevant. The '''endpoints''' tell you when the flow starts and stops. When using the profiler, it's common to constrain the timeline to these endpoints. The '''bottleneck''' is the resource (e.g. CPU, disk) that is maxed out and preventing the device from reaching the flow's final endpoint sooner (e.g. removing expensive computation may not improve perf if the bottleneck is the desk).
 
Our critical flows, their endpoints, and their bottlenecks are listed below.
 
=== Start up ===
There are a few different types of start up: see [[#Terminology|Terminology]] for clarifications.
 
* COLD MAIN (to homescreen) start
**Endpoints: process start and visual completeness (i.e. the homescreen is fully drawn)
***Neither endpoint is available in the profiler. Surrogates are <code>Application.onCreate</code> or <code>*Activity.onCreate</code> to the first frame is drawn (the last two have profiler markers)
**Bottleneck: we believe it's the main thread
**Misc: a possibly important event for perceived performance is when the first frame is drawn
 
* WARM MAIN (to homescreen) start
**Endpoints: <code>MigrationDecisionActivity.onCreate</code> (Beta & Release builds) or <code>HomeActivity.onCreate</code> (Nightly & debug builds) and visual completeness.
**Bottleneck: see COLD MAIN
**Misc: see COLD MAIN
 
* COLD VIEW start
**Endpoints: process start and <code>GeckoSession.load</code>
***The latter endpoint is available as a profiler marker
**Bottleneck: unknown
**Misc: a possibly important event for perceived performance is when the first frame is drawn
 
* WARM VIEW start
**Endpoints: <code>IntentReceiverActivity.onCreate</code> and <code>GeckoSession.load</code>
**Bottleneck: see COLD VIEW
**Misc: see COLD VIEW
 
In addition to these types of start up, there are many states/configurations a client can start up with: for example, they can have FxA set up or not set up, they may have 1000s or 0 bookmarks, etc. We haven't yet found any to have a significant impact on performance but, to be honest, we haven't yet to investigate deeply.
 
=== Page load ===
TODO
 
=== Search experience ===
TODO
== Performance testing ==
Confirm
975
edits

Navigation menu