MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / buildLargeTree

Function buildLargeTree

packages/core/src/runtime/__tests__/widgetMeta.test.ts:512–524  ·  view source on GitHub ↗

* Build a large tree for performance testing.

(rowCount: number)

Source from the content-addressed store, hash-verified

510 * Build a large tree for performance testing.
511 */
512function buildLargeTree(rowCount: number): VNode {
513 const rows: VNode[] = [];
514 for (let i = 0; i < rowCount; i++) {
515 rows.push(
516 ui.row({}, [
517 ui.button({ id: `btn-${i}`, label: `Button ${i}` }),
518 ui.input({ id: `input-${i}`, value: "" }),
519 ui.text(`Row ${i}`),
520 ]),
521 );
522 }
523 return ui.column({}, rows);
524}
525
526test("widgetMeta: collectAllWidgetMetadata performance - single traversal vs 6 separate", () => {
527 // Keep the workload large enough that timing noise doesn't dominate.

Callers 1

widgetMeta.test.tsFile · 0.85

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected