Open vertonghenb opened 4 years ago
I definitely think this is worth investigating, at the very least. I've not tried virtualisation before, but I've read through the samprof repo a long time ago, when he first released it and it looked good. Might be the best starting point?
Personally I'm not fond of using the package since it also requires some .js or .css files. However, we could package them with ours and use the same idea EmbeddedBlazorContent
they use in that package.
app.UseEmbeddedBlazorContent(typeof(BlazorVirtualScrolling.VirtualScroll).Assembly);
@using EmbeddedBlazorContent
<head>
...
@Html.EmbeddedBlazorContent()
</head>
However this is quite harsh in my opinion and I think we'd be better off rolling our own system.
I'm certainly up for rolling our own. I'd prefer not to take a dependency where we don't absolutely have to.
Recheck if an Array<T>
is still the way to go, initially we didn't use .Count()
that much, maybe swap it for a Dictionary
Also coming in .NET 5 (Virtualize Component)
@vertonghenb where did you find that information? I really hope some kind of virtualization is supported natively in Blazor, but I didn't find any GitHub issue documenting the progress on this
@vertonghenb where did you find that information? I really hope some kind of virtualization is supported natively in Blazor, but I didn't find any GitHub issue documenting the progress on this
In one of the asp.net live community stand-ups.
@JohnKiller
Daniel Roth (of MS) replied a question about virtualization in asp.net blog:
"We’ve added a Virtualize component to help with handling virtualization in .NET 5 RC1, which should be available in a couple of weeks.. You can try out a .NET 5 RC1 build from https://github.com/dotnet/installer."
That was 31. August, so I guess we don't have to wait too long...
Any updates?
@rybkov Are you experiencing performance issue with the component?
@chrissainty I would say not with the component specifically, but with any component that has to render lots of items. I found that 100 suggestions is not so bad, but anything after feels the delay in the rendering. Business requirements is to show lots of data and would be nice to have virtual scroll in place.
If you have a big list of items the rendering can slow down the component. To tackle this performance hit, we could use the idea of virtualization where we only render de SelectItems which are being shown.
A package that does this is the following: https://samprof.github.io/BlazorVirtualScrolling/ However we could also roll our own, so I'm looking for some feedback on this one.