HomePhabricator
Diffusion Comm 84b611f0316c

[native] Remove `boundChatListData` from `useThreadListSearch` dep list

Tags
None
Referenced Files
F760437: 9baa62.png
Sep 18 2023, 2:04 PM
File Not Attached
F760436: e01b47.png
Sep 18 2023, 2:04 PM
File Not Attached
Subscribers
None

Description

[native] Remove boundChatListData from useThreadListSearch dep list

Summary:
There's no reason for boundChatListData to be an argument to useThreadListSearch as it's only included in a dep list where it's also not needed.

When boundChatListData updated it forced an update of threadSearchResults and usersSearchResults which led to listData getting recomputed THREE times. After this change it only gets recomputed once and causes ChatThreadList to re-render once.

Before:

e01b47.png (566×962 px, 309 KB)

After:

9baa62.png (306×966 px, 170 KB)

(There's the "Focused" ChatThreadList and the "Background" ChatThreadList, so "halve" the logs above)


Depends on D9214

Test Plan: Things continue to work as expected and the "navigate to thread with varun" flow is now a lot faster.

Reviewers: ginsu, tomek, rohan

Reviewed By: tomek

Subscribers: rohan, ashoat

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

Details

Provenance
atulAuthored on Sep 14 2023, 9:08 PM
Reviewer
tomek
Differential Revision
D9215: [native] Remove `boundChatListData` from `useThreadListSearch` dep list
Parents
rCOMM74c8424f88cc: [native] Consume `useThreadListSearch` in `ChatThreadList`
Branches
Unknown
Tags
Unknown