@@ -182,6 +182,28 @@ defineComponent({
182182 } ) ,
183183} ) ;
184184
185+ // 1000-item flat each with five fields per item. Mount-only, no
186+ // mutations. Items signal stays at framework defaults so the
187+ // workload represents the path a typical author takes when
188+ // declaring a list without hand-tuning Signal options. Measures
189+ // per-record creation and Signal allocation cost on mount.
190+ defineComponent ( {
191+ tagName : 'bench-each-mount' ,
192+ renderingEngine : 'native' ,
193+ template :
194+ `{#each item in items}<div><span>{item.a}</span><span>{item.b}</span><span>{item.c}</span><span>{item.d}</span><span>{item.e}</span></div>{/each}` ,
195+ defaultState : {
196+ items : Array . from ( { length : 1000 } , ( _ , i ) => ( {
197+ id : `id-${ i } ` ,
198+ a : `a${ i } ` ,
199+ b : `b${ i } ` ,
200+ c : `c${ i } ` ,
201+ d : `d${ i } ` ,
202+ e : `e${ i } ` ,
203+ } ) ) ,
204+ } ,
205+ } ) ;
206+
185207/*******************************
186208 Bench Runner
187209*******************************/
@@ -309,6 +331,22 @@ for (let i = 0; i < 50; i++) {
309331performance . measure ( 'active-indicator-nested-200' , startMark ( 'active-indicator-nested-200' ) ) ;
310332destroy ( ) ;
311333
334+ /*******************************
335+ Each mount
336+ *******************************/
337+
338+ // Mark before createElement so the timer captures the entire mount
339+ // path: connectedCallback, fullRender, Renderer construction,
340+ // parseHTML, bindMarkers, and the each block's per-record creation.
341+ // No mutation cycle follows. Only mount cost is measured.
342+ // purpose: Mounts a fresh 1000-item each block with five-field items so per-record allocation cost dominates the wall clock.
343+ performance . mark ( startMark ( 'each-mount-1000' ) ) ;
344+ const el10 = document . createElement ( 'bench-each-mount' ) ;
345+ container . appendChild ( el10 ) ;
346+ await flush ( ) ;
347+ performance . measure ( 'each-mount-1000' , startMark ( 'each-mount-1000' ) ) ;
348+ destroy ( ) ;
349+
312350/*******************************
313351 Results
314352*******************************/
0 commit comments