Skip to content

FluentDataGrid initial load performance #4676

Closed

Description

I'm using a FluentDataGrid with ItemsProvider and Virtualize=true.

I noticed there is a delay between the grid header being displayed and grid rows being displayed. The ItemsProvider callback isn't async. I would expect data to be displayed immediately.

I investigated and noticed that the ItemsProvider is always called multiple times on page load. And I noticed the second call is behind a Task.Delay:

// Debounce the requests. This eliminates a lot of redundant queries at the cost of slight lag after interactions.
// TODO: Consider making this configurable, or smarter (e.g., doesn't delay on first call in a batch, then the amount
// of delay increases if you rapidly issue repeated requests, such as when scrolling a long way)
await Task.Delay(100);
if (request.CancellationToken.IsCancellationRequested)
{
return default;
}
// Combine the query parameters from Virtualize with the ones from PaginationState
var startIndex = request.StartIndex;
var count = request.Count;
if (Pagination is not null)
{
startIndex += Pagination.CurrentPageIndex * Pagination.ItemsPerPage;
count = Math.Min(request.Count, Pagination.ItemsPerPage - request.StartIndex);
}
GridItemsProviderRequest<TGridItem> providerRequest = new(
startIndex, count, _sortByColumn, _sortByAscending, request.CancellationToken);
var providerResult = await ResolveItemsRequestAsync(providerRequest);

Ideally there shouldn't be:

  • Multiple calls to ItemsProvider (it doesn't matter much in my case because the data isn't that large or async)
  • A forced 100ms delay before items are displayed.

Activity

  1. added
    triage
    on Apr 7, 2026
  2. added
    status:needs-investigation
    and removed
    triage
    on Apr 7, 2026
  3. added 2 commits that reference this issue on Apr 7, 2026
    5ff9081
    eafab98
  4. added
    community:contribution
    on Apr 7, 2026
  5. added a commit that references this issue on Apr 7, 2026
    381bd25
  6. added a commit that references this issue on Apr 7, 2026
    2f9a6c6
  7. added a commit that references this issue on Apr 8, 2026
    e18df76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

community:contributionstatus:needs-investigation

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions