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

When Ivy is enabled, TypeScript code is super slow #1176

Closed
hinok opened this issue Mar 4, 2021 · 2 comments · Fixed by #1180
Closed

When Ivy is enabled, TypeScript code is super slow #1176

hinok opened this issue Mar 4, 2021 · 2 comments · Fixed by #1180
Assignees
Labels
bug ivy Feature / enhancement / bug fix in Ivy

Comments

@hinok
Copy link

hinok commented Mar 4, 2021

Describe the bug

TypeScript autocompletion and navigation is super slow to a point where normal work is not anymore possible.
Loading... tooltips and broken autocompletion complicates working with TypeScript so much that at some point day-to-day work is exhausting.

To Reproduce

Steps to reproduce the behavior:

  1. Have a "big angular" project...
  2. Create a very simple file that exports one thing and import "2 or 3 things" like in videos below
  3. Try to use cmd|ctrl + click or use autocompletion / IntelliSense

Expected behavior

Navigation after cmd|ctrl + click should be "quick".
IntelliSense should be "quick".
There should NOT be any Loading... tooltip that lasts forever.

Logs

Log file gives us deep insight into the behavior and performance of the extension, so we strongly
recommend you upload it.

Go to the command palette (Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows), search Open Angular Server log

I cannot provide logs because they reveal project structure, files names and I cannot take the risk of exposing such informations, sorry 😓

Videos

When ivy disabled

disabled.mp4

When ivy enabled

enabled.mp4

Additional context

  • Issue Type: Bug
  • Extension Name: ng-template
  • Extension Version: 11.2.5
  • OS Version: Darwin x64 19.6.0
  • VSCode version: 1.54.0

Related issues

@hinok hinok added the bug label Mar 4, 2021
@kyliau kyliau added the ivy Feature / enhancement / bug fix in Ivy label Mar 4, 2021
@atscott atscott changed the title When Ivy is enabled, autocompletion of TypeScript code is super slow When Ivy is enabled, TypeScript code is super slow Mar 5, 2021
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 8, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 8, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
@atscott atscott self-assigned this Mar 8, 2021
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 8, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 8, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 8, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 9, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 10, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 10, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit to atscott/vscode-ng-language-service that referenced this issue Mar 10, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes angular#1176
atscott added a commit that referenced this issue Mar 10, 2021
…gular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes #1176
atscott added a commit that referenced this issue Mar 10, 2021
…ular context

The Angular Language Service extension of vscode has several pieces to
it:

* The client, which communicates directly with vscode
* The server, which handles LSP requests over an lsp connection
* @angular/language-service which provides concrete answers to LS queries

We added an optimization the @angular/language-service which exits early
when a request is outside the Angular context. This prevents unnecessary
Angular analysis of a file when we know from the start that there are no
Angular-specific results at a location.

This commit provides an additional optimization by adding a similar preventing
short-circuit from the client side. This prevents requests from even
being sent to the server when we know there is no Angular information at
a location. This optimization is a necessary addition because the server
can be blocked from processing requests if another one is taking a while
to respond. We found that requests for diagnostics, which are necessary
when opening a new file, block other server requests from being
processed. This commit would prevent that block from happening by never
making the request to the server in the first place.

fixes #1176
@atscott
Copy link
Collaborator

atscott commented Mar 15, 2021

Re-opening since the commit which fixed this was reverted. We should be able to get this back in to a release this week.

Edit: This should now be resolved in the 11.2.8 release

@atscott atscott reopened this Mar 15, 2021
@atscott atscott closed this as completed Mar 15, 2021
@angular-automatic-lock-bot
Copy link

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 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug ivy Feature / enhancement / bug fix in Ivy
Projects
None yet
3 participants