Skip to content

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

Open
@chrisbobbe

Description

@chrisbobbe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-homeThe home screens of the app; finding and starting conversationsa-sticky_headerOur `sticky_header` libraryperformanceSmooth and responsive UI; fixing jank, stutters, and lag

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions