angular/packages/core/src/render3/interfaces
mgechev 520ff69854 perf(core): add private hooks around user code executed by the runtime (#41255)
Introduces an **internal**, **experimental** `profiler` function, which
the runtime invokes around user code, including before and after:
- Running the template function of a component
- Executing a lifecycle hook
- Evaluating an output handler

The `profiler` function invokes a callback set with the global
`ng.ɵsetProfiler`. This API is **private** and **experimental** and
could be removed or changed at any time.

This implementation is cheap and available in production. It's cheap
because the `profiler` function is simple, which allows the JiT compiler
to inline it in the callsites. It also doesn't add up much to the
production bundle.

To listen for profiler events:

```ts
ng.ɵsetProfiler((event, ...args) => {
  // monitor user code execution
});
```

PR Close #41255
2021-04-02 10:34:23 -07:00
..
container.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
context.ts refactor(core): co-locate read/write patched data functions (#41097) 2021-03-08 08:38:00 -08:00
definition.ts refactor(core): rename ɵɵFactoryDef to ɵɵFactoryDeclaration (#41119) 2021-03-22 08:57:18 -07:00
document.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
i18n.ts refactor(core): clean up circular dependencies (#39233) 2020-10-21 18:33:00 -07:00
injector.ts fix(core): Allow passing AbstractType to the inject function (#37958) 2020-11-24 10:42:21 -08:00
node.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
player.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
projection.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
public_definitions.ts refactor(compiler): use ɵɵInjectorDeclaration rather than ɵɵInjectorDef in compiled output (#41119) 2021-03-22 08:57:18 -07:00
query.ts fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
renderer.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
renderer_dom.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
sanitization.ts feat(core): allow returning Trusted Types from SanitizerFn (#39218) 2020-10-16 08:13:52 -07:00
styling.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
type_checks.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
view.ts perf(core): add private hooks around user code executed by the runtime (#41255) 2021-04-02 10:34:23 -07:00