X Tutup
The Wayback Machine - https://web.archive.org/web/20211019183842/https://github.com/angular/angular/pull/39693
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(compiler-cli): ensure module resolution cache is reused for type-check program #39693

Closed

Conversation

@JoostK
Copy link
Member

@JoostK JoostK commented Nov 14, 2020

The Angular compiler creates two ts.Programs; one for emit and one for
template type-checking. The creation of the type-check program could
benefit from reusing the ts.ModuleResolutionCache that was primed
during the creation of the emit program. This requires that the compiler
host implements resolveModuleNames, as otherwise TypeScript will setup
a ts.ModuleResolutionHost of its own for both programs.

This commit ensures that resolveModuleNames is always implemented,
even if the originally provided compiler host does not. This is
beneficial for the ngc binary.

@google-cla google-cla bot added the cla: yes label Nov 14, 2020
@ngbot ngbot bot added this to the needsTriage milestone Nov 14, 2020
@ngbot ngbot bot added this to the needsTriage milestone Nov 14, 2020
@ngbot ngbot bot added this to the needsTriage milestone Nov 14, 2020
@JoostK JoostK marked this pull request as ready for review Nov 14, 2020
@JoostK JoostK requested a review from alxhub Nov 14, 2020
alxhub
alxhub approved these changes Mar 8, 2021
…-check program

The Angular compiler creates two `ts.Program`s; one for emit and one for
template type-checking. The creation of the type-check program could
benefit from reusing the `ts.ModuleResolutionCache` that was primed
during the creation of the emit program. This requires that the compiler
host implements `resolveModuleNames`, as otherwise TypeScript will setup
a `ts.ModuleResolutionHost` of its own for both programs.

This commit ensures that `resolveModuleNames` is always implemented,
even if the originally provided compiler host does not. This is
beneficial for the `ngc` binary.
@JoostK JoostK force-pushed the ngtsc/shared-module-resolution-cache branch from d2b3254 to d6be996 Mar 9, 2021
@ngbot ngbot bot removed this from the needsTriage milestone Mar 9, 2021
@ngbot ngbot bot added this to the Backlog milestone Mar 9, 2021
@ngbot ngbot bot removed this from the needsTriage milestone Mar 9, 2021
@ngbot ngbot bot added this to the Backlog milestone Mar 9, 2021
@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Mar 9, 2021

AndrewKushnir added a commit that referenced this issue Mar 9, 2021
…-check program (#39693)

The Angular compiler creates two `ts.Program`s; one for emit and one for
template type-checking. The creation of the type-check program could
benefit from reusing the `ts.ModuleResolutionCache` that was primed
during the creation of the emit program. This requires that the compiler
host implements `resolveModuleNames`, as otherwise TypeScript will setup
a `ts.ModuleResolutionHost` of its own for both programs.

This commit ensures that `resolveModuleNames` is always implemented,
even if the originally provided compiler host does not. This is
beneficial for the `ngc` binary.

PR Close #39693
@angular-automatic-lock-bot
Copy link

@angular-automatic-lock-bot angular-automatic-lock-bot bot commented Apr 9, 2021

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
X Tutup