Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upfix(language-service): use tsLSHost to do module resolution #32479
Conversation
e12f2ae
to
d04ab57
This comment has been minimized.
This comment has been minimized.
|
@andrius-pra you would be interested in this! :) |
This comment has been minimized.
This comment has been minimized.
ngbot
bot
commented
Sep 4, 2019
This comment has been minimized.
This comment has been minimized.
|
caretaker: failure in |
This is a patch PR for angular#32479 This PR fixes a critical performance issue where the language service makes a MASSIVE number of filesystem calls when performing module resolution. This is because there is no caching. To make matters worse, module resolution is performed for every program change (which means every few keystrokes trigger a massive number of fs calls). There are two solutions here: Provide a cache to ts.resolveModuleName() Use ts.LanguageServiceHost.resolveModuleNames() Since every Project (and by extension ConfiguredProject) implements ts.LanguageServiceHost interface, (2) is the preferred solution here. i.e. the TypeScript LanguageServiceHost always has the resolveModuleNames() defined even though it's optional in the interface.
This comment has been minimized.
This comment has been minimized.
|
@kyliau, I have compiled language service and tested with angular/vscode-ng-language-service@next. I'm getting these errors in console logs:
and also the language server crash here (tsserverlibrary.js): my environment: |
This comment has been minimized.
This comment has been minimized.
|
I am seeing the issue @andrius-pra noted as well. This does not seem to be an issue with 1439441 ; it is repro without that commit. |
This PR fixes a critical performance issue where the language service makes a MASSIVE number of filesystem calls when performing module resolution. This is because there is no caching. To make matters worse, module resolution is performed for **every** program change (which means every few keystrokes trigger a massive number of fs calls).
This is a patch PR for angular#32479 This PR fixes a critical performance issue where the language service makes a MASSIVE number of filesystem calls when performing module resolution. This is because there is no caching. To make matters worse, module resolution is performed for every program change (which means every few keystrokes trigger a massive number of fs calls).
This is a patch PR for #32479 This PR fixes a critical performance issue where the language service makes a MASSIVE number of filesystem calls when performing module resolution. This is because there is no caching. To make matters worse, module resolution is performed for every program change (which means every few keystrokes trigger a massive number of fs calls). PR Close #32483
This PR fixes a critical performance issue where the language service makes a MASSIVE number of filesystem calls when performing module resolution. This is because there is no caching. To make matters worse, module resolution is performed for **every** program change (which means every few keystrokes trigger a massive number of fs calls). PR Close angular#32479
This comment has been minimized.
This comment has been minimized.
angular-automatic-lock-bot
bot
commented
Oct 11, 2019
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |





kyliau commentedSep 4, 2019
•
edited by ayazhafiz
This PR fixes a critical performance issue where the language
service makes a MASSIVE number of filesystem calls when performing
module resolution.
This is because there is no caching. To make matters worse, module
resolution is performed for every program change (which means every
few keystrokes trigger a massive number of fs calls).
There are two solutions here:
Since every Project (and by extension ConfiguredProject) implements
ts.LanguageServiceHost interface, (2) is the preferred solution here.
i.e. the TypeScript LanguageServiceHost always has the
resolveModuleNames() defined even though it's optional in the interface.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information