Skip to content

Commit 8ff2f3e

Browse files
authored
Update performance notes for SetParametersAsync method (#37061)
1 parent 792ad06 commit 8ff2f3e

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

aspnetcore/blazor/performance/rendering.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: ASP.NET Core Blazor rendering performance best practices
3+
ai-usage: ai-assisted
34
author: guardrex
45
description: Tips for improving the rendering performance of ASP.NET Core Blazor apps and avoiding common performance problems.
56
monikerRange: '>= aspnetcore-3.1'
67
ms.author: wpickett
78
ms.custom: mvc
8-
ms.date: 11/11/2025
9+
ms.date: 04/28/2026
910
uid: blazor/performance/rendering
1011
---
1112
# ASP.NET Core Blazor rendering performance best practices
@@ -331,7 +332,17 @@ In extreme cases, you can override the component's virtual <xref:Microsoft.AspNe
331332

332333
In the preceding code, returning the base class <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> runs the normal lifecycle method without assigning parameters again.
333334

334-
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, it can improve rendering performance by 20-25%, but you should only consider this approach in the extreme scenarios listed earlier in this section.
335+
:::moniker range=">= aspnetcore-8.0"
336+
337+
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, the approach can yield a small rendering improvement, typically under ~10% even at 10,000+ component instances when targeting .NET 10. The potential gains are smaller in later releases because reflection-based parameter assignment is optimized. Only consider this approach in the extreme scenarios listed earlier in this section and benchmark first&mdash;the savings are usually dwarfed by other costs, for example, the SignalR [diff (DOM edits)](xref:blazor/components/lifecycle#lifecycle-events) transport for Interactive Server.
338+
339+
:::moniker-end
340+
341+
:::moniker range="< aspnetcore-8.0"
342+
343+
As you can see in the preceding code, overriding <xref:Microsoft.AspNetCore.Components.ComponentBase.SetParametersAsync%2A> and supplying custom logic is complicated and laborious, so we don't generally recommend adopting this approach. In extreme cases, the approach can improve rendering performance by 20-25%, but you should only consider this approach in the extreme scenarios listed earlier in this section.
344+
345+
:::moniker-end
335346

336347
## Don't trigger events too rapidly
337348

0 commit comments

Comments
 (0)