-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
[blazor] HtmlRenderer is slow #22405
Comments
I don't know if this is related but a major showstopper for us adapting Blazor is the lack of a fast DataGrid component. We currently run AG Grid + Angular and it is blazing fast. Currently available commercial Blazor Grids are slow (with larger dataset) - it really hurts! Same issue is pointed out from others: #21514 (comment) |
@Lupusa87 If you could provide a fairly minimal example of the kind of component structure you're trying to render where prerendering is slow, we could try to focus our investigations and optimization efforts around that kind of scenario. It's possible also that something in your scenario is triggering unusually bad perf behavior and we might be able to help suggest an alternative. |
@Postlagerkarte you can check my VirtualGrid comp used in virtual grid demo, live here. |
@SteveSandersonMS Thank you, I will prepare separate repo and link here very soon. One thing to double check, is htmlrenderer used only for prerender or for regular blazor routine? If only prerender than does not really makes sense to continue talking about htmlrenderer because I have not issues with prerender. My problem is that blazor comp is working slow when it updates frequently. In my current case I have text where some letters are randomly converted to another alphabet based user slider input, it mens also frequent refresh of component which causes delays and gc activities. |
Thanks for contacting us. We're going to address the leftover work here as part of #22432 |
htmlrenderer is now working too slow when there is bit complex and large renderfragment or component.
I know it is going to change, just wanted to report that htmlRenderer, RenderFragment frames and all this model seems bit overheat and causes long processing times.
htmlRenderer produces too long tokens list and is doing lot of work to get right html result.
I think there can be simpler, lightweight solution, do not get me wrong but this part really needs good refactoring.
one option: If we let developer provide more data when building render tree, converting it to html can be much faster
or to let dev write html along with building tree, there won't be any need to generate html from frames, just it will be ready for use stored in some string builder.
In this case developer will be responsible to have correct html but it's ok when major performance wins can be achieved.
Just give me way to tell component to skip html generating heavy task and I will provide it under my responsibility.
I know razor pages are default and promoted way to construct blazor components but if we can have also opportunity to get faster components using RenderTreeBuilder will be great.
I understand that I can't see big picture and there can be something making my request stupid, sorry if it's the case.
@SteveSandersonMS
@rynowak
@javiercn
The text was updated successfully, but these errors were encountered: