[release/6.0] Fix virtualization handling of large dataset length changes. Fixes #37245 #37250
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.
Backport of #37247 to release/6.0
/cc @SteveSandersonMS
Description/Customer Impact
The
Virtualizecomponent exhibits pathological behavior in the following case:Instead of jumping back to the new maximum scroll position, it incrementally steps back to it one page at a time. In the above example, if the scroll region is tall enough for 20 items, that would take (100000-100)/20 = 4995 steps. On each step it requests a new data set (possibly causing an HTTP request and DB query) and a UI re-render.
Eventually this does complete, but it's extraordinarily inefficient. It's very trivial to fix this so that we move to the correct final scroll offset in a single step.
Regression?
Risk
Verification
Packaging changes reviewed?
Fixes #37245