Skip to content

Commit 492a43a

Browse files
authored
[Blazor] Performance - Parameter values bundling vs. change detection
1 parent e3a1591 commit 492a43a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aspnetcore/blazor/performance.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ To reduce parameter load, bundle multiple parameters in a custom class. For exam
228228
}
229229
```
230230

231-
However, consider that it might be an improvement not to have a table cell component, as shown in the preceding example, and instead [inline its logic into the parent component](#inline-child-components-into-their-parents).
231+
However, keep in mind that bundling primitive parameters into a class isn't always an advantage. While it can reduce parameter count, it can also impact how change detection and rendering behave. Setting non-primitive parameters causes the component to rerender every time, even if the values themselves haven't changed. This behavior can offset the potential benefits.
232+
233+
Also, consider that it might be an improvement not to have a table cell component, as shown in the preceding example, and instead [inline its logic into the parent component](#inline-child-components-into-their-parents).
232234

233235
> [!NOTE]
234236
> When multiple approaches are available for improving performance, benchmarking the approaches is usually required to determine which approach yields the best results.

0 commit comments

Comments
 (0)