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

reduce the amount of list items rendered simultaneously #1987

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

kaitoo1
Copy link
Collaborator

@kaitoo1 kaitoo1 commented Oct 4, 2023

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

  • If this is a new feature, include screenshots or recordings of the feature in action.
  • If this PR makes visual changes, include before and after screenshots.
Before After
CleanShot 2023-10-04 at 20 32 59@2x CleanShot 2023-10-04 at 20 32 41@2x

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:

  • I've tested the changes and all tests pass.
  • (if web) I've tested the changes on various desktop screen sizes to ensure responsiveness.
  • (if mobile) I've tested the changes on both light and dark modes.

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
gallery ✅ Ready (Inspect) Visit Preview Oct 4, 2023 0:06am

@github-actions github-actions bot added the web label Oct 4, 2023
@github-actions
Copy link

github-actions bot commented Oct 4, 2023

Bundle Sizes

Compared against 5ebd2a5

Route: No significant changes found

Dynamic import: No significant changes found

@Robinnnnn Robinnnnn merged commit 2b1e3ff into main Oct 4, 2023
@Robinnnnn Robinnnnn deleted the kaito/reduce-virtualized-items branch October 4, 2023 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants