Repository navigation
Migrate app startup snippets - #1055
pengzhi-cb wants to merge 7 commits into
Conversation
|
Here is the summary of changes. You are about to add 3 region tags.
This comment is generated by snippet-bot.
|
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
3e6e001 to
8f5c282
Compare
|
Thanks Peng, could you rename the title of the PR to something like Migrate performance snippets? Also feel free to remove any comments in the PR description if it refers to intermediate states of the PR and is not reflected in the final code (e.g. mentions of System.gc() can be removed now). I've also added our Performance DRE, Ajesh, for review on the PR too. |
Got it, since the final diff wouldn't show those intermediary changes and it will be confusing to reviewer. Let me remove. |
| // Disable unused AGP features | ||
| viewBinding = true | ||
|
|
||
| buildConfig = true |
There was a problem hiding this comment.
actually instead of enabling this in the build file, can we handle this by declaring a mock object in the AnalysisOptimization file?
private object BuildConfig {
const val DEBUG = true
}
Because I think enabling this property can have build time implications for everyone using the snippets repo. And in the AGP 8.0 Release Notes, it looks like buildConfig is false by default to eliminate this compilation overhead.
8f5c282 to
6c8c78c
Compare
kkuan2011
left a comment
There was a problem hiding this comment.
Looks good after comments are addressed
|
Looks good, thanks! |
670ac3a to
3574247
Compare
…izationMove files to performance module
…anceSnippets - Correct the package declaration in `AnalysisOptimization.kt` to match the directory structure - Add proper curly braces to the `if (BuildConfig.DEBUG)` block in `AnalysisOptimization.kt` - Relocate fake classes/methods to the bottom of `PerformanceSnippets.kt` and update the block comment style to standard syntax (`/* END Fakes */`)
3574247 to
c0d00b9
Compare
Code snippets are for:
Total: 5 code snippets (3 unique Kotlin snippets and 0 XML snippets) across 2 pages.
List of modifications
...placeholders with// ...comments and added braces{ ... }around theif (BuildConfig.DEBUG)body inMyApplication.onCreate()(android_performance_appstartup_strict_mode).{ mutableStateOf(false) }inandroid_compose_performance_conditional_compositionandandroid_compose_performance_conditional_composition_effect.android_compose_performance_conditional_compositionandandroid_compose_performance_conditional_composition_effectinPerformanceSnippets.kt, and normalized indentation from 3 spaces to 4 spaces.Snippets not migrated