perf(ivy): use module resolution cache (#34332)
During TypeScript module resolution, a lot of filesystem requests are done. This is quite an expensive operation, so a module resolution cache can be used to speed up the process significantly. This commit lets the Ivy compiler perform all module resolution with a module resolution cache. Note that the module resolution behavior can be changed with a custom compiler host, in which case that custom host implementation is responsible for caching. In the case of the Angular CLI a custom compiler host with proper module resolution caching is already in place, so the CLI already has this optimization. PR Close #34332
This commit is contained in:
@ -39,7 +39,7 @@ export class RouterEntryPointManager {
|
||||
if (moduleName === undefined) {
|
||||
return null;
|
||||
}
|
||||
const resolvedSf = this.moduleResolver.resolveModuleName(relativeFile, context);
|
||||
const resolvedSf = this.moduleResolver.resolveModule(relativeFile, context.fileName);
|
||||
if (resolvedSf === null) {
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user