reduce the amount of list items rendered simultaneously #1987
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of Changes
We currently render about 10-12 items in the virtualized feed at any given moment on web. Since we live render pieces, this creates a big burden on the browser if there are a lot of generative pieces on the feed. We're currently rendering ~10 rows total that aren't visible above or below the screen edge via the
overscanRowCount
prop, so this PR reduces it to 2 above and below.This means we only render 2 rows above and 2 rows below what's currently visible, drastically reducing the number of invisible items we display.
Demo or Before/After Pics
video, before
CleanShot.2023-10-04.at.20.27.00.mp4
video, after
CleanShot.2023-10-04.at.20.31.44.mp4
Edge Cases
Looked at different pages with feeds
Testing Steps
go scroll anywhere that uses the FeedList component and verify the scrolling behavior seems normal
Checklist
Please make sure to review and check all of the following: