-
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
Add benchmarks for TypicalUserJourney, Enable baselineprofile generator, and some metrics #601
Conversation
# Conflicts: # app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/com/jerboa/ui/components/post/PostActivity.kt # app/src/main/java/com/jerboa/ui/components/post/PostListings.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.
Thank you for doing this work. Hopefully it can add illuminate our performance issues, although I'm fairly convinced its just jetpack-compose LazyList slowness.
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.
How did these get included? Should probably be added to gitignore.
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.
I explicitly included these, since these are the baseline profiles that were generated. They take around 50minutes to generate and generally don't really need to be rebuild (unless extensive changes happen to the codebase).
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.
Also i have already looked a bit into it, but imo its nothing to do with the lazylist. It fully recompositions the whole view on scroll (ex on scrolling posts it recompositions also the bottomappbar) It might have to do with passing down the navhostController as it is considered unstable but without actually solving the problem i can't say anything for certain
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.
mmmk, I spose that's fine.
# Conflicts: # app/src/main/java/com/jerboa/ui/components/home/HomeActivity.kt # app/src/main/java/com/jerboa/ui/components/post/PostActivity.kt # app/src/main/java/com/jerboa/ui/components/post/PostListings.kt # build.gradle
# Conflicts: # app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt # app/src/main/java/com/jerboa/ui/components/home/Home.kt
The first step to improve performance is to measure it, I have added macrobenchmarks for for the critical user journey that is suffering from performance issues.
This is includes:
I have also added baseline & startup profile generator which generates the baseline profile for the typical user journey.
You can run them using the configuration that I included (they take a long time about 40m)
And the benchmarks with them for comparison, the only significant performance increase that I measured is from the startup
Where
timeToInitialDisplay
is the time it took to draw its first frame andtimeToFullDisplay
time it took to load all the postsWhich is a decrease for about 20%.
The other benchmarks use FrameTimingMetric which includes
frameOverrunMs
metric which is the more important metric (as positive numbers mean jank) but this metric is android 12+ which i am not in possession off. So it would be great if someone could run them and confirm no significant differences.Further I have also included the ability to generate compose compiler metrics. Which I will try to use later to decipher the scrolling performances issues.
I had also added some DEX layout optimizations but I have removed them due them being very experimental but I can add them back if that is wanted.