HomePhabricator
Diffusion Comm 4b33216d7218

[lib] Use ChatThreadItemLoaderCache for loading sidebar

Description

[lib] Use ChatThreadItemLoaderCache for loading sidebar

Summary:
We have the same problem for sidebars that we have at the parent level, especially for the "Daily updates" channel, which has close to 1000 sidebars inside of it.

We need to avoid creating a Promise for each sidebar. We can use ChatThreadItemLoaderCache to achieve this.

Depends on D14144

Test Plan: I tested this task by playing around with the ChatThreadList on mobile while using a stopwatch to measure how long various operations took. I tested the updated code 3 times against both the most recent Testflight build as well as master. I found that performance was approximately the same as before. I tested scrolling down, selecting threads that were read, selecting threads that were unread, and search.

Reviewers: tomek, angelika

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D14154

Details

Provenance
ashoatAuthored on Dec 12 2024, 7:37 PM
Reviewer
tomek
Differential Revision
D14154: [lib] Use ChatThreadItemLoaderCache for loading sidebar
Parents
rCOMM58176056c7d3: [native] Stop resetting ChatThreadList on navigation
Branches
Unknown
Tags
Unknown