Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch initial hydration. #345

Closed

Conversation

Szymon20000
Copy link
Contributor

@Szymon20000 Szymon20000 commented Sep 15, 2023

We recently opened a pull-request with feature that is batching all setStates called on withOnyx components.
All but the ones caused by connecting withOnyx to date for the first time.
It may seem to be not a big deal as we probably don't have much withOnyx components on a single screen.
Unfortunately, that's not true. All Chat items on the ReportScreen are wrapped in withOnyx. reactions and IOUreport props are almost never in the cache what basically means we have to delay rendering of an item until we get those from our DB. That means that all messages are rendered in a separate renders :0

We already handled the case with adding initial value pr but I'm sure similar problems occurs in other parts of the app.
This pull-requests adds logic that will batch such setStates automatically.

Details

Related Issues

GH_LINK

Automated Tests

Linked PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant