Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Oct 4, 2021

Backport of #37247 to release/6.0

/cc @SteveSandersonMS

Description/Customer Impact

The Virtualize component exhibits pathological behavior in the following case:

  • User scrolls to the end of a very long list (e.g., 100000 items)
  • The list becomes much shorter (e.g., 100 items)

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?

  • Yes
  • No

Risk

  • High
  • Medium
  • Low
  • Change was verified manually and via a new E2E test
  • The code change is trivial: we can detect and correct the invalid scroll offset in a single step. The new logic shouldn't affect any existing case where the scroll offset was valid.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

Fixes #37245

@github-actions github-actions bot requested a review from a team as a code owner October 4, 2021 11:12
@ghost ghost added the area-blazor Includes: Blazor, Razor Components label Oct 4, 2021
@SteveSandersonMS SteveSandersonMS added the Servicing-consider Shiproom approval is required for the issue label Oct 4, 2021
@ghost
Copy link

ghost commented Oct 4, 2021

Hi @github-actions[bot]. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@mkArtakMSFT mkArtakMSFT added this to the 6.0.0 milestone Oct 5, 2021
@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Oct 5, 2021
@mkArtakMSFT mkArtakMSFT merged commit 0146d25 into release/6.0 Oct 5, 2021
@mkArtakMSFT mkArtakMSFT deleted the backport/pr-37247-to-release/6.0 branch October 5, 2021 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components Servicing-approved Shiproom has approved the issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants