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

Update README.md #676

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/guides/performance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Getting this method correct is, undoubtedly, the most important performance aspe
Please **don't** add `key` prop to the output of `rowRenderer`. It is intentional to not have it. Adding it will stop recycling and cause random mounts/unmounts. It will totally ruin performance.

### 3) Estimated heights
If you're using `forceNonDeterministicRendering` the layout manager expects heigts and widths provided by you as close estimates. By default in first pass RLV will compute layout based on estimates and position items. Post that RLV uses `ItemAnimator` to gracefully move items to actual positions based on actual layouts computed after views mount.
If you're using `forceNonDeterministicRendering` the layout manager expects heights and widths provided by you as close estimates. By default in first pass RLV will compute layout based on estimates and position items. Post that RLV uses `ItemAnimator` to gracefully move items to actual positions based on actual layouts computed after views mount.

Any mismatch in actual and estimated layouts leads to relayout cycles which are not a concern if estimates are close otherwise it becomes a performance bottleneck. Incorrect values may lead to lot of visual glitches and increased blank areas.

Lower estimates may also lead to extra mounts which are not required while higer estimates cause mounts to happen unexpectedly when RLV realises there aren't enough views to fill the screen.
Lower estimates may also lead to extra mounts which are not required while higher estimates cause mounts to happen unexpectedly when RLV realises there aren't enough views to fill the screen.

Make sure you try to bring estimates close to actual values. Non deterministic mode improves dev experience dramatically and with some effort you can match the performance of `deterministic` mode where there is zero layout thrashing.

Expand Down Expand Up @@ -70,7 +70,7 @@ In case you have frequent full page refreshes where entire data changes e.g, cac
Note: `stableId` feature is only available in versions above `1.4.0`

### 7) `renderAheadOffset` usage
`renderAheadOffset` specifies how much ahead of current scroll postion does RLV renders items to prevent visible blank spaces. This buffer is maintained both on the top and bottom of the list. You may choose a to play with this but only after you've taken care of all other points.
`renderAheadOffset` specifies how much ahead of current scroll position does RLV renders items to prevent visible blank spaces. This buffer is maintained both on the top and bottom of the list. You may choose a to play with this but only after you've taken care of all other points.

Please note that lower value is better. A lower values ensures that less number of views are created and that they're quickly available for recycling. You should be choosing the smallest value that gives you zero blank spaces while scrolling.
Larger values mount extra views and increases the offset after which views are available for recycling but it might help with faster scrolling depending on the use case.
Expand Down