-
Notifications
You must be signed in to change notification settings - Fork 431
[DataGrid] Add IsFixed parameter #3921
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
Conversation
Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
@copilot with the suggested changes, can we remove the hash calculation on the items in the DataGrid (which was added in v4.12.0)? |
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 60.6%
|
Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
Yes, with the IsFixed parameter we can optimize the hash calculation further. I've updated the implementation to completely skip hash computation when IsFixed=true, eliminating unnecessary CPU cycles for static datasets while preserving the hash calculation for dynamic datasets (IsFixed=false) to maintain backward compatibility. Commit 42b5eca Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot with the suggested changes, remove the hash calculation and comparisons completely. Only use the IsFixed parameter to determine if the refresh should be executed |
…parameter Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
I've removed the hash calculation and comparisons completely as requested. The refresh logic now uses only the IsFixed parameter to determine if refresh should be executed. This simplifies the implementation significantly while maintaining all the performance benefits. The changes include removing the ComputeItemsHash method, _lastAssignedItemsHashCode field, and all hash-based change detection logic. Commit 07a7395 Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: vnbaaij <1761079+vnbaaij@users.noreply.github.com>
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
This PR adds an
IsFixed
parameter to theFluentDataGrid
component that allows developers to optimize performance when working with static datasets that are not expected to change during the grid's lifetime. Fix #3911Changes
New Parameter
IsFixed
boolean parameter with default valuefalse
to maintain backward compatibilityIsFixed=true
, the grid optimizes refresh behavior for static datasetsIsFixed=false
(default), maintains existing behavior from v4.11.9Performance Optimizations
When
IsFixed=true
:RefreshItems
calls to only forced or initial requestsUsage Example
Implementation Details
OnParametersSetAsync()
to respect theIsFixed
parameter in change detection logicRefreshDataCoreAsync()
to be more conservative about automatic refreshes whenIsFixed=true
Backward Compatibility
false
ensures existing code continues to work unchangedThis implementation replaces the automatic refresh logic that was added in v4.12.0 with more controlled behavior when developers know their dataset is static, providing significant performance benefits for such scenarios.
Fixes #3920.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
7tjvsblobprodcus341.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)80zvsblobprodcus35.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)8xbvsblobprodcus382.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)aka.ms
curl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED
(dns block)bcnvsblobprodcus378.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)c50vsblobprodcus330.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)c78vsblobprodcus322.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)d0svsblobprodcus381.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)imzvsblobprodcus368.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)jd4vsblobprodcus366.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)jrqvsblobprodcus343.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)kh4vsblobprodcus325.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)kmuvsblobprodcus389.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)l49vsblobprodcus358.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)lylvsblobprodcus31.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)nn8vsblobprodcus340.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)o3svsblobprodcus318.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)uy6vsblobprodcus34.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)vb4vsblobprodcus33.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)x3yvsblobprodcus370.vsblob.vsassets.io
dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj
(dns block)dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj -f net9.0
(dns block)dotnet test tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj -f net9.0 --filter FluentDataGrid_IsFixed --verbosity normal
(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.