Benchmark different IComponent implementations #63222
Unanswered
companion-dotnet
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anybody an idea how i could properly benchmark Blazor components (rendering count and rendering duration/load would be interesting i guess)? I am developing a small Blazor-based framework and have implemented singals as they exist in angular (if you set the value of an signal and it changes, all components that use that signal during rendering get re-rendered automtically). I expected less render cycles with more stuff happening while rendering (project: https://github.com/companion-dotnet/companion-dotnet)
I currently plan to use BenchmarkDotNet for detailed benchmarks and the eShop for a bigger sample project. I just could not figure out how i can measure the metrics, as the last overridable method before rendering (ShouldRender) is not run inside the render queue
The only option i found would be to just copy-paste both components, which is not exactly what i would prefer to do
Edit: To clarify my question, i plan to run some detailed benchmarks with BDN to get a overview, how much Signals slow down the rendering. Then i would count the re-renders in the different setups. With those values, i think i can afterwards calculate how Signals are performing compared to plain Blazor. The questions where i think i need some advice: what is the most efficient solution to measure the render count (ideally also the render duration, but i guess that one is optional), and are there any problems with my approach i might not have thought of
Beta Was this translation helpful? Give feedback.
All reactions