Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Benchmark different IComponent implementations #63222

Unanswered
companion-dotnet asked this question in Q&A
Discussion options

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

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /