Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(ivy): add missing dom element in render3_function tree benchmark #21476

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 13 additions & 9 deletions modules/benchmarks/src/tree/render3/tree.ts
Expand Up @@ -87,7 +87,7 @@ export class TreeComponent {
});
}

export class TreeFunction extends TreeComponent {
export class TreeFunction {
data: TreeNode = emptyTree;

/** @nocollapse */
Expand All @@ -104,15 +104,19 @@ export class TreeFunction extends TreeComponent {

export function TreeTpl(ctx: TreeNode, cm: boolean) {
if (cm) {
E(0, 'span');
{ T(1); }
E(0, 'tree');
{
E(1, 'span');
{ T(2); }
e();
C(3);
C(4);
}
e();
C(2);
C(3);
}
s(0, 'background-color', b(ctx.depth % 2 ? '' : 'grey'));
t(1, b1(' ', ctx.value, ' '));
cR(2);
s(1, 'background-color', b(ctx.depth % 2 ? '' : 'grey'));
t(2, b1(' ', ctx.value, ' '));
cR(3);
{
if (ctx.left != null) {
let cm0 = V(0);
Expand All @@ -121,7 +125,7 @@ export function TreeTpl(ctx: TreeNode, cm: boolean) {
}
}
cr();
cR(3);
cR(4);
{
if (ctx.right != null) {
let cm0 = V(0);
Expand Down