microsoft/fluentui-blazor

fix: Performance issue in FluentIcon

ThatGuyMike7 opened this issue ยท 1 comments

๐Ÿ› Bug Report

Multiple FluentIcons in a FluentDataGrid lead to very slow repaint (250ms and higher).

The repro contains two pages that are identical, except one page has a FluentButton with a FluentIcon in each data grid row (performance issue) and the other page has a FluentButton with text in each data grid row (ok).

The delete buttons in the repro toggle the visibility of a loading indicator so the performance issue is visible directly.

๐Ÿ’ป Repro or Code Sample

Click me

๐Ÿค” Expected Behavior

When clicking the delete button, a repaint is triggered which should not take more than a few ms.

๐Ÿ˜ฏ Current Behavior

When clicking the delete button, a repaint is triggered that can take more than 250ms.

๐Ÿ”ฆ Context

I added a delete button to each data grid row (with a delete icon).

๐ŸŒ Your Environment

Windows 11
Visual Studio 2022
Microsoft Edge
.NET 7.0
ASP.NET Core Components WASM 7.0.3 (see project file)
FluentUI Blazor 2.1.1 (see project file)

Further investigation has revealed that the delay lies (very) deep in the wasm bowels (apparently in function 221):
image
image

If anyone has knowledge that can help here that would be much appreciated. Until then this will stay like it is, I guess.