masastack / MASA.Blazor

Blazor UI component library based on Material Design. Support Blazor Server, Blazor WebAssembly and MAUI Blazor.
https://docs.masastack.com/blazor/getting-started/installation
Other
1.19k stars 159 forks source link

[Bug Report]: Autocomplete Many Renders #1691

Closed wisamidris7 closed 4 months ago

wisamidris7 commented 10 months ago

Masa.Blazor version

latest

Describe the bug

Render Comes To 7 Renders In FirstRender And When I Click Any Key 2 Renders This Is Not Normal At All

In DeepClone In InternalValue The Renders For Every Autocomplete It Comes 17 and sometimes 12 as minumum in Select When Having Many Autocompletes I Maked I Report Page And Report Contains Up To 8 Autocompletes

Expected Behavior

No response

Steps To Reproduce

No response

Reproduction code

No response

.NET version

No response

What browsers are you seeing the problem on?

No response

Additional context

No response

capdiem commented 10 months ago

@wisamidris7 Where is the firstrender called seven times? I think you mean seven times in OnAfterRender. Autcomplete has a lot of logic, and multiple renderings can happen. This may not be a bug, but there may be room for optimization, which I will take a look at in the future.

wisamidris7 commented 10 months ago

Where is the firstrender called seven times?

I mean without toching the autocomplete just when he loads And I'm Waiting For Masa.Blazor To Get Better And Move On Cause The App I'm Using Is Uses A Lot Of Autocompletes So When You Use It It's Becomes Very Very Slow And After Aot It Become Also Slow But Not The Same As Non AOT

And Thanks!

capdiem commented 10 months ago

@wisamidris7 Can you provide a simple example? So I can find the problem easily.

capdiem commented 4 months ago

Starting from v1.6.0, Autocomplete now utilizes virtualization to handle items. This significantly improves rendering speed in scenarios with large amounts of data. Therefore, this issue can be closed.