-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lib] Avoid creating Promises for showInMessagePreview if not needed
Summary: This solves [ENG-10201](https://linear.app/comm/issue/ENG-10201/cold-start-is-significantly-slower-in-build-460), in a similar way to how D14136 (and associated stack) solved [ENG-9952](https://linear.app/comm/issue/ENG-9952/investigate-performance-regression-on-mobile-build-444). The basic story is that creating too many `Promise`s overwhelms Hermes, and in particular this occurs for many Farcaster-linked communities where all of the recent messages are membership robotext messages about users joining the community. Luckily, we only need `Promise`s for `showInMessagePreview` in `reactionMessageSpec`. This diff simply updates the signature of `showInMessagePreview` to allow for returning immediately (instead of a `Promise`), which solves the performance regression. More context on Linear [here](https://linear.app/comm/issue/ENG-10201/cold-start-is-significantly-slower-in-build-460#comment-8746a762). Test Plan: Deployed a Release build to my iOS device. Prior to this diff, it reproduced the cold start performance regression. Following this diff, it no longer reproduced. Reviewers: tomek, angelika Reviewed By: tomek Differential Revision: https://phab.comm.dev/D14361
- Loading branch information
Showing
7 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters