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

Inbox: Reduce some scrolling jank by making one StickyHeaderListView item per topic / DM conversation #389

Open
chrisbobbe opened this issue Nov 18, 2023 · 0 comments
Labels
a-home The home screens of the app; finding and starting conversations a-sticky_header Our `sticky_header` library performance Smooth and responsive UI; fixing jank, stutters, and lag
Milestone

Comments

@chrisbobbe
Copy link
Collaborator

Instead of having a whole section (all-DMs or a stream) be an item.

Quoting Greg from #381 (review):

As I mentioned in our call today, I played with this on my Pixel 5 to see the performance, using a test user on chat.zulip.org who has a ton of unreads. In debug mode the performance was pretty choppy — occasional pauses while scrolling that I believe reflected a new section scrolling into view, so that with the current version the whole section has to be built and laid out, which can be hundreds of items for different topics. Those pauses in debug mode were sometimes around a second long.

It's fine for debug mode to be choppy, though, so I tried it in profile mode. There there's still enough jank to be noticeable, but it's a lot milder — mostly a couple of dropped frames at a time, sometimes like 150ms. So this level of performance is fine for Beta 1, but it's something we'll want to revisit for Beta 2.

Probably that means I'll rework something in StickyHeaderListView to make it possible to have a separate list item for each conversation, just like you did in a previous draft, and without the glitchy interactions that that led to between one section's header and the next. (Effectively the current StickyHeaderListView assumes that each header is no taller than the item it belongs to; that's true in the message list, and it's true here by making each entire section into an item, but it's not true if each conversation is its own item.)

@gnprice gnprice added this to the Beta 2 milestone Nov 18, 2023
@gnprice gnprice added a-home The home screens of the app; finding and starting conversations a-sticky_header Our `sticky_header` library performance Smooth and responsive UI; fixing jank, stutters, and lag labels Nov 18, 2023
@gnprice gnprice removed their assignment Nov 22, 2023
gnprice added a commit to gnprice/zulip-flutter that referenced this issue Feb 8, 2024
…tions

These were never getting consulted, because these aren't entire items
of the enclosing list view; rather the items are the whole sections,
i.e. either a whole stream or all DMs.  Because they weren't doing
anything, they're confusing for understanding how this code works
and making changes to it.

I think this happened because in an early draft of zulip#381, the list-view
items were individual conversations.  That's the arrangement that
would be better for performance/smoothness reasons anyway, but it
won't work until we make some changes to the sticky_header library;
see zulip#389.  When we go to do zulip#389, we can always add these
StickyHeaderItem widgets back.
chrisbobbe pushed a commit that referenced this issue Feb 12, 2024
…tions

These were never getting consulted, because these aren't entire items
of the enclosing list view; rather the items are the whole sections,
i.e. either a whole stream or all DMs.  Because they weren't doing
anything, they're confusing for understanding how this code works
and making changes to it.

I think this happened because in an early draft of #381, the list-view
items were individual conversations.  That's the arrangement that
would be better for performance/smoothness reasons anyway, but it
won't work until we make some changes to the sticky_header library;
see #389.  When we go to do #389, we can always add these
StickyHeaderItem widgets back.
@gnprice gnprice modified the milestones: B2: pre-summer, Launch May 9, 2024
@gnprice gnprice modified the milestones: Launch, Post-launch Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-home The home screens of the app; finding and starting conversations a-sticky_header Our `sticky_header` library performance Smooth and responsive UI; fixing jank, stutters, and lag
Projects
Status: No status
Development

No branches or pull requests

2 participants