-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve stableness #1040
Improve stableness #1040
Conversation
# Conflicts: # app/src/main/java/com/jerboa/MainActivity.kt # app/src/main/java/com/jerboa/ui/components/community/CommunityActivity.kt # app/src/main/java/com/jerboa/ui/components/home/BottomNavActivity.kt # app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt # app/src/main/java/com/jerboa/ui/components/person/PersonProfileActivity.kt # app/src/main/java/com/jerboa/ui/components/post/PostActivity.kt # app/src/main/java/com/jerboa/ui/components/post/PostListing.kt # app/src/main/java/com/jerboa/ui/components/post/create/CreatePostActivity.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested, and this works well. Thx especially for moving the navcontroller out of the composables.
I'll let @twizmwazin look this over before merging.
@@ -33,7 +31,7 @@ class LoginViewModel : ViewModel() { | |||
fun login( | |||
instance: String, | |||
form: Login, | |||
navController: NavController, | |||
onGoHome: () -> Unit, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, that's unfortunate that the navController can't be passed down and causes rerenders. But I like how you've done this, its cleaner anyway.
Improve stableness of many composables. The root cause is navHostController. It is considered unstable
"skippableComposables": 549, -> 582
"knownUnstableArguments": 393, ->234
examples of before
after
Metrics files
compose_metrics_old.zip
compose_metrics.zip
Also redid the baseline profiles
I have still many ideas, but I ll keep those for other PRs. This one is big enough already.