Skip to content

Commit f75296e

Browse files
marclavalIgorMinar
authored andcommitted
perf: add benchmarks for IV and render3 with functions (tree) (#20855)
PR Close #20855
1 parent 0867e85 commit f75296e

File tree

9 files changed

+172
-0
lines changed

9 files changed

+172
-0
lines changed

modules/benchmarks/e2e_test/largetable_perf.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ describe('largetable benchmark perf', () => {
6565
}).then(done, done.fail);
6666
});
6767

68+
it('should run for iv', (done) => {
69+
runTableBenchmark({
70+
id: `largeTable.iv.${worker.id}`,
71+
url: 'all/benchmarks/src/largetable/iv/index.html',
72+
ignoreBrowserSynchronization: true,
73+
worker: worker
74+
}).then(done, done.fail);
75+
});
76+
6877
it('should run for the baseline', (done) => {
6978
runTableBenchmark({
7079
id: `largeTable.baseline.${worker.id}`,

modules/benchmarks/e2e_test/largetable_spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ describe('largetable benchmark spec', () => {
3232
});
3333
});
3434

35+
it('should work for iv', () => {
36+
testTableBenchmark({
37+
url: 'all/benchmarks/src/largetable/iv/index.html',
38+
ignoreBrowserSynchronization: true,
39+
});
40+
});
41+
3542
it('should work for the baseline', () => {
3643
testTableBenchmark({
3744
url: 'all/benchmarks/src/largetable/baseline/index.html',

modules/benchmarks/e2e_test/tree_data.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,18 @@ export const Benchmarks: Benchmark[] = [
5555
buttons: CreateDestroyDetectChangesButtons,
5656
ignoreBrowserSynchronization: true,
5757
},
58+
{
59+
id: `deepTree.ng2.render3_function`,
60+
url: 'all/benchmarks/src/tree/render3_function/index.html',
61+
buttons: CreateDestroyDetectChangesButtons,
62+
ignoreBrowserSynchronization: true,
63+
},
64+
{
65+
id: `deepTree.iv`,
66+
url: 'all/benchmarks/src/tree/iv/index.html',
67+
buttons: CreateDestroyDetectChangesButtons,
68+
ignoreBrowserSynchronization: true,
69+
},
5870
{
5971
id: `deepTree.baseline`,
6072
url: 'all/benchmarks/src/tree/baseline/index.html',
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
5+
<h2>Params</h2>
6+
<form>
7+
Cols:
8+
<input type="number" name="cols" placeholder="cols" value="40">
9+
<br>
10+
Rows:
11+
<input type="number" name="rows" placeholder="rows" value="200">
12+
<br>
13+
<button>Apply</button>
14+
</form>
15+
16+
<h2>IV Largetable Benchmark</h2>
17+
<p>
18+
<button id="destroyDom">destroyDom</button>
19+
<button id="createDom">createDom</button>
20+
<button id="updateDomProfile">profile updateDom</button>
21+
<button id="createDomProfile">profile createDom</button>
22+
</p>
23+
24+
<div>
25+
<largetable id="root"></largetable>
26+
</div>
27+
28+
<script type="text/javascript" src="largetable.js"></script>
29+
30+
</body>
31+
</html>

modules/benchmarks/src/largetable/iv/largetable.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!doctype html>
2+
<html>
3+
<body>
4+
5+
<h2>Params</h2>
6+
<form>
7+
Depth:
8+
<input type="number" name="depth" placeholder="depth" value="9">
9+
<br>
10+
<button>Apply</button>
11+
</form>
12+
13+
<h2>IV Tree Benchmark</h2>
14+
<p>
15+
<button id="destroyDom">destroyDom</button>
16+
<button id="createDom">createDom</button>
17+
<button id="detectChanges">detectChanges</button>
18+
<button id="updateDomProfile">profile updateDom</button>
19+
<button id="createDomProfile">profile createDom</button>
20+
<button id="detectChangesProfile">profile detectChanges</button>
21+
</p>
22+
23+
<div>
24+
Change detection runs:<span id="numberOfChecks"></span>
25+
</div>
26+
<div id="root"></div>
27+
28+
<script type="text/javascript" src="tree.js"></script>
29+
</body>
30+
</html>

0 commit comments

Comments
 (0)