HomePhabricator
Diffusion Comm 37df956ea00c

[native] Memoize `swipeableThread` in `ChatThreadListItem`

Tags
None
Referenced Files
F746740: 3a946b.png
Sep 8 2023, 3:11 PM
File Not Attached
F746741: 8cb34d.png
Sep 8 2023, 3:11 PM
File Not Attached
F746742: 014d54.png
Sep 8 2023, 3:11 PM
File Not Attached
Subscribers
None

Description

[native] Memoize swipeableThread in ChatThreadListItem

Summary:
This prevents re-renders of SwipeableThreads. As of this diff we've reduced the time of ChatThreadList re-renders from ~600ms to ~70ms.

ChatThreadListItem before D9102:

014d54.png (1×2 px, 648 KB)

ChatThreadListItem before this diff:

8cb34d.png (1×2 px, 892 KB)

ChatThreadListItem after this diff:

3a946b.png (1×2 px, 920 KB)

(This is the chatThreadListItem for Daily Updates)


Depends on D9102

Test Plan: Things continue to look/work as expected.

Reviewers: ginsu, tomek, rohan

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
atulAuthored on Sep 8 2023, 3:07 PM
Reviewer
tomek
Differential Revision
D9103: [native] Memoize `swipeableThread` in `ChatThreadListItem`
Parents
rCOMMe0f8b65e0b18: [native] Memoize construction of `sidebars` in `ChatThreadListItem`
Branches
Unknown
Tags
Unknown