HomePhabricator
Diffusion Comm 402c80e99845

[native] Add more memoization to `SwipeableMessage`

Description

[native] Add more memoization to SwipeableMessage

Summary:
As mentioned in D9053, SwipeableMessage is "expensive" to render. As I've been looking through the flamegraphs it seems like a general trend that gesture handlers/Reanimated components are expensive to render and we should memoize as agressively as possible so we only "eat the cost" once.

In this diff I add more memoization to SwipeableMessage to reduce re-renders of the nested SwipeSnake and PanGestureHandler components.


Depends on D9053

Test Plan: Things continue to work as expected, profiler confirmed that this reduced re-renders.

Reviewers: ginsu, tomek, rohan

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
atulAuthored on Sep 5 2023, 12:00 PM
Reviewer
tomek
Differential Revision
D9054: [native] Add more memoization to `SwipeableMessage`
Parents
rCOMMeca7deebd10b: [native] introduce custom bottom sheet handle component
Branches
Unknown
Tags
Unknown