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

Virtualizer: Optimize IO usage and export useMeasureList #32375

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

Mitch-At-Work
Copy link
Contributor

@Mitch-At-Work Mitch-At-Work commented Aug 23, 2024

Breaking change: Additional info was required to be shared between hooks, this added new properties to our hook inputs which are required for accurate calculation of IO depth (Virtualizer is still in old preview format)

Previous Behavior

useMeasureList was not exported
IO would iterate based on it's current position

New Behavior

useMeasureList is now exported
IO now iterates based on how far into the IO the user scrolls, cutting down re-renders significantly

@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review August 23, 2024 19:55
@Mitch-At-Work Mitch-At-Work requested a review from a team as a code owner August 23, 2024 19:55
@fabricteam
Copy link
Collaborator

fabricteam commented Aug 23, 2024

📊 Bundle size report

✅ No changes found

@fabricteam
Copy link
Collaborator

fabricteam commented Aug 23, 2024

Perf Analysis (@fluentui/react-components)

Scenario Render type Master Ticks PR Ticks Iterations Status
FluentProviderWithTheme virtual-rerender 40 32 10 Possible regression
All results

Scenario Render type Master Ticks PR Ticks Iterations Status
Avatar mount 610 661 5000
Button mount 328 302 5000
Field mount 1135 1116 5000
FluentProvider mount 731 702 5000
FluentProviderWithTheme mount 84 85 10
FluentProviderWithTheme virtual-rerender 40 32 10 Possible regression
FluentProviderWithTheme virtual-rerender-with-unmount 82 75 10
MakeStyles mount 867 888 50000
Persona mount 1760 1689 5000
SpinButton mount 1382 1381 5000
SwatchPicker mount 1661 1676 5000

@Mitch-At-Work Mitch-At-Work changed the title Virtualizer: Export useMeasureList hook Virtualizer: Optimize IO usage and export useMeasureList Aug 23, 2024
@Mitch-At-Work Mitch-At-Work marked this pull request as draft August 23, 2024 23:42
@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review August 27, 2024 23:18
@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/export-virtualizer-helpers branch 3 times, most recently from 3894a66 to 429d65a Compare August 28, 2024 17:59
@Mitch-At-Work Mitch-At-Work marked this pull request as draft August 29, 2024 19:42
@Mitch-At-Work Mitch-At-Work force-pushed the user/mifraser/export-virtualizer-helpers branch from 0c84cd4 to edd7073 Compare August 30, 2024 21:50
@Mitch-At-Work Mitch-At-Work marked this pull request as ready for review August 30, 2024 23:08
@Mitch-At-Work Mitch-At-Work requested review from a team and smhigley as code owners August 30, 2024 23:08
Copy link
Contributor

@bsunderhus bsunderhus left a comment

Choose a reason for hiding this comment

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

There's a breaking change in this PR by introducing the containerSizeRef as a required property to the Virtualizer component.

Also, I'd like to understand better what is happening here, so I'll take a bit of time to review properly, at the moment I'm blocking it as it introduces a breaking change and there's no warnings about it in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Virtualizer Needs: API Breaking Change Tracking breaking changes for API surface area Needs: Behavior Breaking Change Tracking breaking changes for behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants