[Question] Get the reason wich cause a component re-render - too many OnAfterRender #14684
Labels
area-blazor
Includes: Blazor, Razor Components
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
question
Milestone
Hi guys, i faced actually a big performance issue with my app built in blazor.
I precise my app can run in server and client mode and the performance issue is only in client mode (web assembly)
I have a view with a component which containing a large table with grouping functionnalty things like that.
I have some action outside this component which can recharge the grid.
On some actions, i freeze the app during 40 seconds, so i put some console.Writeline to see what's happen
I will not put all details of the logs but the things is it seem my component is rendered 9 times, on interval of 3 or 4 seconds approximatively (so i retrieve my 40 seconds off freeze).
One is justified, is when my component itself recharge when he see data changed (i put a log inside this place too, it called only one time).
I put a log in the OnParameterSet => this event is not called and its logic
I centralise all my StateHasChanged of all my components in a central method. These method is called only one time, on the handler when my data changed. On this place it seem Ok too.
So i have finally 8 OnAfterRender completely mysterious and it's huge problem for me to not understand from where they come from.
Unfortunately i can't reproduce the problem, my app is really big and complex, she use external code (existing silverlight ViewModel) and external services (existing Wcf services), so i have to debug by myself, that's why i need information.
So if you have idea on how i can "retrieve" the origin of theses render let me know !
Thanks for your help !
Julien
The text was updated successfully, but these errors were encountered: