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 contenttypes to lazy columns #984

Merged
merged 9 commits into from
Jul 19, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Jul 7, 2023

https://developer.android.com/jetpack/compose/lists#content-type

Adds content types to the lazy columns. From my limited testing, I did not notice any significant performance changes.

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.

According to the docs, this is just supposed to refer to the type of item, for lists which have different types. So it just needs to be "comment", "post", etc.

@@ -233,7 +233,7 @@ fun LazyListScope.commentNodeItem(
.commentView.counts.child_count > 0 && !isFlat

increaseLazyListIndexTracker()
item(key = commentId) {
item(key = commentId, contentType = { "contentNodeItemL${node.depth}" }) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh it's just this one that worries me, I ll leave this one out for now and when I get some more time I ll try to get a microbench for this, bc the macrobench currently is not showing any significant perf changes. Same was for the scrolling with baselines/without but from personal expercience the baselines make a bigger impact than they are showing from the tests. So they aren't very reliable imo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha. Yep I'm guessing these aren't going to really matter until we have combined lists, like putting all the notification types (messages, comment replies, and mentions), in a single LazyList.

MV-GH and others added 3 commits July 19, 2023 17:18
# Conflicts:
#	app/src/main/java/com/jerboa/ui/components/common/Dialogs.kt
#	app/src/main/java/com/jerboa/ui/components/home/Home.kt
#	app/src/main/java/com/jerboa/ui/components/post/PostActivity.kt
#	benchmarks/src/main/java/com/jerboa/actions/JerboaActions.kt
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.

Seems good, not sure why build is failing, I'll try a restart.

@dessalines dessalines enabled auto-merge (squash) July 19, 2023 15:45
@dessalines dessalines merged commit 3d9e355 into LemmyNet:main Jul 19, 2023
@MV-GH MV-GH deleted the feat/add_contenttypes branch July 19, 2023 16:21
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