From f823e5d24f81eef12839edb3415cad12736ebe52 Mon Sep 17 00:00:00 2001 From: DEMEY Fanny Date: Wed, 3 Apr 2024 20:59:57 +0200 Subject: [PATCH] move wip mbp into a wip file --- chapters/MBP_WIP_fr.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 chapters/MBP_WIP_fr.md diff --git a/chapters/MBP_WIP_fr.md b/chapters/MBP_WIP_fr.md new file mode 100644 index 0000000..e87d367 --- /dev/null +++ b/chapters/MBP_WIP_fr.md @@ -0,0 +1,36 @@ + +* // TODO : à écrire + +// Don't access the Android UI toolkit from outside the UI thread. => risque de fuite mémoire (la vue est détruite avant que le traitement se termine, la référence a cet objet est maintenu) + +// Limiter l'utilisation des Service (https://developer.android.com/topic/performance/memory#Services) + +// Préférer l'utilisation de SparseArray, SparseBooleanArray, et LongSparseArray plutôt que `HashMap` (https://developer.android.com/topic/performance/memory#DataContainers) + +// Abstraction à éviter si peu utile - https://developer.android.com/topic/performance/memory#Abstractions + +// A creuser : https://developer.android.com/topic/performance/memory#Abstractions + + +// Notifications + +// ABI ?? + +// Feature play store + +// Utiliser correctement implementation testImplementation debugImplementation pour ne pas packager des librairies utilisées uniquement pour les tests ou le debug + +// Reduce cost of inflation (ex ConstraintLayout instead of nested LinearLayout) https://developer.android.com/topic/performance/vitals/render#recyclerview_too_much_inflation_or_create_is_taking_too_long If your view types look good, look at reducing the cost of your inflation. Reducing unnecessary container and structural views can help. Consider building itemViews with ConstraintLayout, which can help reduce structural views. + +* Monitorer la taille de l'application dans le temps (ex d'outil : https://github.com/JakeWharton/diffuse + le playstore) +* Reduire la taille de l'application : https://engineering.atspotify.com/2023/11/the-what-why-and-how-of-mastering-app-size/ https://medium.com/googleplaydev/shrinking-apks-growing-installs-5d3fcba23ce2 + +* [Limiter le recours aux canvas](/chapters/BP_4013_fr.md) +* [Coroutines / Scope / Lifecycle / annulation de traitement](/chapters/BP_4032_fr.md) // https://developer.android.com/topic/libraries/architecture/coroutines +* https://developer.android.com/kotlin/coroutines +* https://developer.android.com/kotlin/coroutines/coroutines-adv#main-safety +* [Préférer la pagination au défilement infini](/chapters/BP_4035_fr.md) +* Ne pas effectuer de traitements asynchrones conséquents sur le thread principal (Dispatcher.MAIN avec les coroutines) + + +Avoid delivering all of your assets and resources at install time if they aren't needed immediately. Reduce your app's install size by placing the largest files in dynamic feature module(s) and delivering them conditionally or on demand, or consider alternatives such as streaming media files. Learn more