Skip to content
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

fix: Performance issue in FluentIcon #370

Closed
ThatGuyMike7 opened this issue Apr 14, 2023 · 1 comment
Closed

fix: Performance issue in FluentIcon #370

ThatGuyMike7 opened this issue Apr 14, 2023 · 1 comment
Labels
improvement A non-feature-adding improvement status:needs-investigation Needs additional investigation

Comments

@ThatGuyMike7
Copy link

🐛 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)

@vnbaaij vnbaaij added status:needs-investigation Needs additional investigation improvement A non-feature-adding improvement labels Apr 19, 2023
@vnbaaij
Copy link
Collaborator

vnbaaij commented Apr 19, 2023

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.

andreisaperski added a commit to andreisaperski/fluentui-blazor that referenced this issue Jun 7, 2023
 - reduced number of StaticAssetService.GetAsync calls in FluentIcon
 - suppression of re-render if parameters haven't changed (when icon is in RenderFragment)
 - dedicated dictionary instead of array is used for icon availability check
andreisaperski added a commit to andreisaperski/fluentui-blazor that referenced this issue Jun 7, 2023
 - reduced number of StaticAssetService.GetAsync calls in FluentIcon
 - suppression of re-render if parameters haven't changed (when icon is in RenderFragment)
 - dedicated dictionary instead of array is used for icon availability check
@vnbaaij vnbaaij closed this as completed in a2b8217 Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement A non-feature-adding improvement status:needs-investigation Needs additional investigation
Projects
None yet
Development

No branches or pull requests

2 participants