Changes

Jump to: navigation, search

Performance/Fenix

1,032 bytes removed, 15:57, 17 August 2021
App start up: Convert section to list automated regression busting
## '''If you're doing this on a built-in API, you'll need to ban use of the old API e.g. with ktlint rule since it's harder to suppress'''
== App start up Preventing regressions automatically ===== Defense ===The FE perf team has We use the following measures in place to prevent regressions:* Show long term start up trends with Nightly performance tests (note: these are not granular enough to practically identify & fix regressions)* Prevent main thread IO by:** Crashing Crash on main thread IO in debug builds using <code>StrictMode</code> ([https://github.com/mozilla-mobile/fenix/blob/13f33049122e0f06c026632812dee405360c53b0/app/src/main/java/org/mozilla/fenix/StrictModeManager.kt#L63-L69 code])** Preventing <code>StrictMode</code> suppressions by running tests that assert for the current known suppression count. We are Code Owners for the tests so we will have a discussion if the count changes (Use [https://githubsearchfox.comorg/mozilla-mobile/fenixrev/blob3af703be7790ff00f78d15465f3b8bb0fde0dccc/13f33049122e0f06c026632812dee405360c53b0fenix/app/src/androidTest/java/org/mozilla/fenix/uiperf/StrictModeStartupSuppressionCountTestStartupExcessiveResourceUseTest.kt#L48-L57 code103 our StartupExcessiveResourceUseTest])* Code added to the start up path should be reviewed by the performance team:** We , for which we are Code Owners for a few files ==== WIP ====We're working on adding, to:* Regression testing per master merge ([https://github.com/mozilla-mobile/perf-frontend-issues/issues/162 issue])* Prevent main thread IO with:Avoid StrictMode suppressions** Static analysis to prevent Avoid <code>runBlocking</code>, which can circumvent <code>StrictMode</code> ([https://github.com/mozilla-mobile/fenix/issues/15278 issue])calls* Code added to the start-up path should be reviewed by the performance team:* Avoid additional component initialization** We're investigating other files that can be separated so we can be code owners for Avoid increasing the start up parts ([https://github.com/mozilla-mobile/fenix/issues/15274 issue])view hierarchy depth* Minimize component initialization with:* Avoid having ConstraintLayout as a RecyclerView child** Avoid unnecessary initialization increasing the number of inflations* Use lint to avoid multiple ConstraintLayouts in the same file ([https://githubsearchfox.comorg/mozilla-mobile/rev/3af703be7790ff00f78d15465f3b8bb0fde0dccc/fenix/issuesmozilla-lint-rules/src/15279 issue])* Prevent unnecessarily expensive UI with:** NestedConstraintLayout static analysis ([https:main/java/github.comorg/mozilla-mobile/fenix/issueslintrules/15280 issueperf/ConstraintLayoutPerfDetector.kt code]) === Offense ===TODO: improve this section, if useful (let us know if it is) We're keeping a list of the biggest known performance improvements we can make. Also, we have a startup improvement plan.
=={{#if:Glossary|<span id="Glossary"></span>|<span class="error">Error in {{tl|anchor}}: no anchor name has been specified.</span>}}<!--
Confirm
975
edits

Navigation menu