Skip to content

Commit

Permalink
refactor(core): use performance API for defer feature
Browse files Browse the repository at this point in the history
This commit adds a standard performance marker that can be viewed in Chrome dev tools and other tooling. See more info at https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark
  • Loading branch information
AndrewKushnir committed Oct 19, 2023
1 parent 217c940 commit 3dc4c6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/defer/instructions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ export function ɵɵdefer(
ɵɵtemplate(index, null, 0, 0);

if (tView.firstCreatePass) {
performance.mark('mark_use_counter', {detail: {feature: 'NgDefer'}});

const tDetails: TDeferBlockDetails = {
primaryTmplIndex,
loadingTmplIndex: loadingTmplIndex ?? null,
Expand Down

0 comments on commit 3dc4c6b

Please sign in to comment.