Skip to content
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

Merged
merged 32 commits into from
Jun 20, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jun 13, 2023

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:

  • App startup
  • Scrolling posts
  • Opening posts
  • Scrolling comments

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
image
Where timeToInitialDisplay is the time it took to draw its first frame and timeToFullDisplay time it took to load all the posts
Which 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.

Copy link
Member

@dessalines dessalines left a 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.

Copy link
Member

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.

Copy link
Collaborator Author

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).

Copy link
Collaborator Author

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

Copy link
Member

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.

dessalines and others added 7 commits June 19, 2023 08:08
# 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
@MV-GH MV-GH marked this pull request as draft June 19, 2023 14:50
@MV-GH MV-GH marked this pull request as ready for review June 19, 2023 18:43
@dessalines dessalines enabled auto-merge (squash) June 20, 2023 17:38
@dessalines dessalines merged commit 9057eb0 into LemmyNet:main Jun 20, 2023
@MV-GH MV-GH deleted the benchmarks branch September 20, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants