Skip to content

Commit d1c84eb

Browse files
committed
examples: standardize stress tests and remove re-render buttons
1 parent 51298bb commit d1c84eb

159 files changed

Lines changed: 1154 additions & 1496 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/angular/basic-app-table/src/app/app.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,4 @@
4545
</tfoot>
4646
</table>
4747
<div class="spacer-md"></div>
48-
<button (click)="rerender()" class="demo-button">Rerender</button>
49-
<span class="demo-note">Render count: {{ renderCount() }}</span>
5048
</div>

examples/angular/basic-app-table/src/app/app.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ export class App {
106106
}
107107
// 6. Store data with a stable reference
108108
readonly data = signal<Array<Person>>([...defaultData])
109-
readonly renderCount = signal(0)
110109

111110
// 7. Create the table instance with the required columns and data.
112111
// Features and row models are already defined in the createTableHook call above
@@ -116,8 +115,4 @@ export class App {
116115
columns,
117116
data: this.data(),
118117
}))
119-
120-
rerender() {
121-
this.renderCount.update((count) => count + 1)
122-
}
123118
}

examples/angular/basic-external-atoms/src/app/app.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="demo-root">
22
<div>
33
<button (click)="refreshData()" class="demo-button">Regenerate Data</button>
4-
<button (click)="stressTest()" class="demo-button">Stress Test (200k rows)</button>
4+
<button (click)="stressTest()" class="demo-button">Stress Test (1M rows)</button>
55
</div>
66
<div class="spacer-md"></div>
77
<table>
@@ -97,7 +97,5 @@
9797
</select>
9898
</div>
9999
<div class="spacer-md"></div>
100-
<button (click)="rerender()" class="demo-button">Rerender</button>
101-
<span>Render count: {{ renderCount() }}</span>
102100
<pre>{{ stringifiedState() }}</pre>
103101
</div>

examples/angular/basic-external-atoms/src/app/app.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export class App {
6060
}
6161

6262
readonly data = signal(makeData(1_000))
63-
readonly renderCount = signal(0)
6463
readonly sortingAtom = createAtom<SortingState>([])
6564
readonly paginationAtom = createAtom<PaginationState>({
6665
pageIndex: 0,
@@ -84,13 +83,8 @@ export class App {
8483
}
8584

8685
stressTest() {
87-
this.data.set(makeData(200_000))
86+
this.data.set(makeData(1_000_000))
8887
}
89-
90-
rerender() {
91-
this.renderCount.update((count) => count + 1)
92-
}
93-
9488
onPageInputChange(event: Event) {
9589
const input = event.target as HTMLInputElement
9690
const page = input.value ? Number(input.value) - 1 : 0

examples/angular/basic-external-state/src/app/app.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="demo-root">
22
<div>
33
<button (click)="refreshData()" class="demo-button">Regenerate Data</button>
4-
<button (click)="stressTest()" class="demo-button">Stress Test (200k rows)</button>
4+
<button (click)="stressTest()" class="demo-button">Stress Test (1M rows)</button>
55
</div>
66
<div class="spacer-md"></div>
77
<table>
@@ -100,7 +100,5 @@
100100
</select>
101101
</div>
102102
<div class="spacer-md"></div>
103-
<button (click)="rerender()" class="demo-button">Rerender</button>
104-
<span>Render count: {{ renderCount() }}</span>
105103
<pre>{{ stringifiedState() }}</pre>
106104
</div>

examples/angular/basic-external-state/src/app/app.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ export class App {
6767
readonly data = signal(makeData(1_000))
6868
readonly sorting = signal<SortingState>([])
6969
readonly pagination = signal<PaginationState>({ pageIndex: 0, pageSize: 10 })
70-
readonly renderCount = signal(0)
7170

7271
readonly table = injectTable(() => ({
7372
key: 'basic-external-state', // needed for devtools
@@ -100,13 +99,8 @@ export class App {
10099
}
101100

102101
stressTest() {
103-
this.data.set(makeData(200_000))
102+
this.data.set(makeData(1_000_000))
104103
}
105-
106-
rerender() {
107-
this.renderCount.update((count) => count + 1)
108-
}
109-
110104
onPageInputChange(event: Event) {
111105
const input = event.target as HTMLInputElement
112106
const page = input.value ? Number(input.value) - 1 : 0

examples/angular/basic-inject-table/src/app/app.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,4 @@
4545
</tfoot>
4646
</table>
4747
<div class="spacer-md"></div>
48-
<button (click)="rerender()" class="demo-button">Rerender</button>
49-
<span class="demo-note">Render count: {{ renderCount() }}</span>
5048
</div>

examples/angular/basic-inject-table/src/app/app.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ export class App {
103103
}
104104
// 5. Store data with a stable reference
105105
readonly data = signal<Array<Person>>([...defaultData])
106-
readonly renderCount = signal(0)
107106

108107
// 6. Create the table instance with required features, columns, and data
109108
readonly table = injectTable(() => ({
@@ -113,8 +112,4 @@ export class App {
113112
columns,
114113
data: this.data(),
115114
}))
116-
117-
rerender() {
118-
this.renderCount.update((count) => count + 1)
119-
}
120115
}

examples/angular/column-groups/src/app/app.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,4 @@
4848
</tfoot>
4949
</table>
5050
<div class="spacer-md"></div>
51-
<button class="demo-button" (click)="rerender()">Rerender</button>
5251
</div>

examples/angular/column-groups/src/app/app.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,4 @@ export class App {
8080

8181
refreshData = () => this.data.set(makeData(20))
8282
stressTest = () => this.data.set(makeData(1_000))
83-
rerender = () => this.data.update((data) => [...data])
8483
}

0 commit comments

Comments
 (0)