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

when set forceNonDeterministicRendering={true}, mistake in performance occurred :( #91

Closed
hasan642 opened this issue Dec 17, 2017 · 4 comments

Comments

@hasan642
Copy link

hasan642 commented Dec 17, 2017

when set forceNonDeterministicRendering={true}, mistake in performance occurred :(, but i cannot set it to false; because layout will be damaged, any one can help??

this without forceNonDeterministicRendering but performance is high.
43d6a89a-1569-47de-a33f-3f81d01c0055.
and this with forceNonDeterministicRendering, layout is awesome but performance is poor
85dce042-553f-4ffe-b498-7ffc31c88345

any idea ??

@naqvitalha
Copy link
Collaborator

You layout looks deterministic to me. All items seem to be of fixed size. In any case, non deterministic shouldn't be much slower. There could be three things which are wrong:

  1. Estimates dimensions are nowhere near the actual ones. This seems to be the case since your deterministic render looks way different.
  2. Missing shouldComponentUpdate in your component which the rowRenderer returns. Very important for non deterministic scenario.
  3. rowHasChanged in dataProvider has an invalid check that returns true most of the time. Most likely this is not the problem since deterministic mode is fast for you.

@hasan642
Copy link
Author

please clarify, what is role of shouldComponentUpdate, rowRender, and rowHasChanged in performance of RecyclerView?
again, thank you very much

@naqvitalha
Copy link
Collaborator

In case of non deterministic rendering RecyclerListView will render a few times for than regular. These cycles are to reposition items after actual render. Since the whole tree will re-render with the listview rowHasChanged and shouldComponentUpdate make sure that your items don't. RecyclerListViews self render is pretty cheap. Having these checks prevents your item from being rendered unnecessarily which significantly reduces JS overhead.

@naqvitalha
Copy link
Collaborator

Inactive for a while. Closing.

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

No branches or pull requests

2 participants