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

Compute range on sync layout #775

Closed

Conversation

vinc3m1
Copy link
Contributor

@vinc3m1 vinc3m1 commented Mar 4, 2021

RecyclerBinder's prefetch happens on onScroll events, but onScroll is only fired after a full frame is rendered.

For fast flings, this could lead to situations where an entire screen is rendered serially and synchronously on the main thread before any parallel layout is kicked off in onScroll.

This change kicks off parallel rendering of an estimated screen size in the direction of scroll immediately upon encountering a synchronous layout.

Combined with LayoutStateFutures, this should unblock the main thread faster than serial synchronous layout in these situations.

@vinc3m1 vinc3m1 force-pushed the compute_range_on_sync_layout branch from 56e4d33 to 66cb39a Compare March 4, 2021 18:31
Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityasharat has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@adityasharat
Copy link
Contributor

The build is failing; could you please confirm and update the PR if required.

@vinc3m1 vinc3m1 force-pushed the compute_range_on_sync_layout branch from 66cb39a to 13c9c61 Compare March 13, 2021 08:18
@facebook-github-bot
Copy link
Contributor

@vinc3m1 has updated the pull request. You must reimport the pull request before landing.

@vinc3m1
Copy link
Contributor Author

vinc3m1 commented Mar 13, 2021

The build is failing; could you please confirm and update the PR if required.

oh right thanks missed some code sorry

@vinc3m1 vinc3m1 force-pushed the compute_range_on_sync_layout branch from 13c9c61 to 5ed1aa9 Compare March 13, 2021 10:13
@facebook-github-bot
Copy link
Contributor

@vinc3m1 has updated the pull request. You must reimport the pull request before landing.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adityasharat has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@adityasharat merged this pull request in 4535f06.

vinc3m1 referenced this pull request Oct 15, 2021
Summary: Same as title

Reviewed By: mihaelao

Differential Revision: D29361136

fbshipit-source-id: d60d76ecb33b6529a5325f6234595735c1a66802
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants