Skip to content
Browse files

perf(ivy): cache export scopes extracted from declaration files (#34332)

The export scope of NgModules from external compilations units, as
present in .d.ts declarations, does not change during a compilation so
can be easily shared. There was already a cache but the computed export
scope was not actually stored there. This commit fixes that.

PR Close #34332
  • Loading branch information
JoostK authored and kara committed Dec 7, 2019
1 parent ce94192 commit eb9a8ac52c40a1cd631d9498a2e4b4fa76bc65c1
Showing with 3 additions and 1 deletion.
  1. +3 −1 packages/compiler-cli/src/ngtsc/scope/src/dependency.ts
@@ -123,9 +123,11 @@ export class MetadataDtsModuleScopeResolver implements DtsModuleScopeResolver {
throw new Error(`Exported value ${exportRef.debugName} was not a directive, pipe, or module`);

return {
const exportScope: ExportScope = {
exported: {directives, pipes},
this.cache.set(clazz, exportScope);
return exportScope;

private maybeAlias<T extends DirectiveMeta|PipeMeta>(

0 comments on commit eb9a8ac

Please sign in to comment.
You can’t perform that action at this time.