Skip to content

Commit

Permalink
perf(ivy): properly initialise global state in the element_text_creat…
Browse files Browse the repository at this point in the history
…e benchmark (angular#32397)

PR Close angular#32397
  • Loading branch information
pkozlowski-opensource authored and sabeersulaiman committed Sep 6, 2019
1 parent 8e2d967 commit 96172e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/test/render3/perf/element_text_create/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {createTNode, createTView} from '../../../../src/render3/instructions/sha
import {ɵɵtext} from '../../../../src/render3/instructions/text';
import {RenderFlags} from '../../../../src/render3/interfaces/definition';
import {TNodeType, TViewNode} from '../../../../src/render3/interfaces/node';
import {resetComponentState} from '../../../../src/render3/state';
import {createAndRenderLView} from '../setup';

`<div>
Expand Down Expand Up @@ -65,6 +66,9 @@ function testTemplate(rf: RenderFlags, ctx: any) {
const viewTNode = createTNode(null !, null, TNodeType.View, -1, null, null) as TViewNode;
const embeddedTView = createTView(-1, testTemplate, 21, 0, null, null, null, null);

// initialize global state
resetComponentState();

// create view once so we don't profile first template pass
createAndRenderLView(null, embeddedTView, viewTNode);

Expand Down

0 comments on commit 96172e1

Please sign in to comment.