Skip to content

Remove default 50ms Scroll Event Throttling in VirtualizedList#38648

Closed
NickGerleman wants to merge 1 commit into
facebook:mainfrom
NickGerleman:export-D47823772
Closed

Remove default 50ms Scroll Event Throttling in VirtualizedList#38648
NickGerleman wants to merge 1 commit into
facebook:mainfrom
NickGerleman:export-D47823772

Conversation

@NickGerleman
Copy link
Copy Markdown
Contributor

@NickGerleman NickGerleman commented Jul 27, 2023

Summary:
This is specific to the scenario, and device, and time-based sampling as implemented on Android may inherently create stutters because we may not proess events at a consistent cadence (and we may never process the last events).

#38475 made this code no longer no-op on Android, which caused scroll regressions documented in #38470

We are already coalescing scroll events on both Android and iOS, which will ensure we are not flooded with events. VirtualizedList also already inserts an artificial 50ms delay by default when high priority work is not happening (see updateCellsBatchingPeriod). This limits the heavy work done by VirtualizedList (no new renders or expensive math on scroll events), while letting the list still have the most recent events.

We can eventually remove this once VirtualizedList is able to use OffScreen universally.

Changelog:
[General][Changed] - Remove default 50ms Scroll Event Throttling in VirtualizedList

Differential Revision: D47823772

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Jul 27, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Jul 27, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,890,067 -90
android hermes armeabi-v7a 7,938,049 -98
android hermes x86 9,287,615 -99
android hermes x86_64 9,189,281 -86
android jsc arm64-v8a 9,478,088 -60
android jsc armeabi-v7a 8,419,082 -61
android jsc x86 9,461,884 -65
android jsc x86_64 9,776,252 -65

Base commit: b0a8d45
Branch: main

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

…ook#38648)

Summary:
Pull Request resolved: facebook#38648

facebook#38475 made this code no longer no-op on Android, which caused regressions documented in facebook#38470 (comment) due to VirtualizedList having more out-of-date information.

We are already coalescing scroll events on both Android and iOS, which will ensure we are not flooded with events. VirtualizedList also already inserts an artificial 50ms delay to new renders by default when high priority work is not happening (see `updateCellsBatchingPeriod`). This limits the heavy work done by VirtualizedList (no new renders or expensive math on scroll events), while letting the list still have the most recent events.

We can eventually remove this once VirtualizedList is able to use OffScreen universally.

Changelog:
[General][Changed] - Remove default 50ms Scroll Event Throttling in VirtualizedList

Reviewed By: ryancat

Differential Revision: D47823772

fbshipit-source-id: dc6290ad02f9cbd40429270fc878d51cbb9b56b9
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D47823772

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 3eccc53.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants