Skip to content

Severe performance issues #2215

@ShacharHarshuv

Description

@ShacharHarshuv

🐞 bug report

Is this a regression?

No, it has been broken for as long as I was using the extension.

Description

Possible reopen of #2131

For as long as I've been using vscode, various language service features, particularly "Go to references" and "Go to definition" have been very very slow to the point they are unusable. I'm talking 4+ seconds each (sometimes so long it seems like nothing happens)
This happens on the first try for a particular symbol. Subsequent tries for the same symbol are fast. It doesn't consistently happen, and I'm not sure why.

This could happen immediately (or almost immediately) after opening vscode, restarting language server doesn't help.
Disabling the angular language service and relying on the ts language service instead makes it work, but of course it means angular specific syntax (like templates) wouldn't work.

I verified this reproduces on at least 2 different code bases, suggesting it's not a specific problem with my codebase. Though I can't reproduce 100% consistently. I'm not sure why it sometimes happen and sometimes not.

This is still reproducing in the most up to date version 20.2.2.

Other potentially related issues:

  • Opening "options" with alt+enter takes forever, and sometimes randomly comes up with "no options available" even though this symbol can actually be imported from somewhere. (The same thing would sometimes work and sometimes not work)

Bug Type

  • Angular Language Service VSCode extension
  • Angular Language Service server

I'm not sure where exactly the bug is out of these two options

Reproduction

As far as I can tell this could happen with any code base of significant size and any symbol you try to "go to", particularly if you haven't opened the relevant files recently.

Logs

Trace logs immediately after sending such a request. This one took almost 7 seconds. Except the request, the results and the times it doesn't seem like there are many useful information here - let me know what other experiments I can do to give you guys more insights.

[Trace - 4:00:00 PM] Sending request 'textDocument/codeLens - (7)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts"
    }
}


[Trace - 4:00:02 PM] Received response 'textDocument/references - (6)' in 6704ms.
Result: [
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts",
        "range": {
            "start": {
                "line": 6,
                "character": 17
            },
            "end": {
                "line": 6,
                "character": 44
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-census-quintiles.ts",
        "range": {
            "start": {
                "line": 16,
                "character": 9
            },
            "end": {
                "line": 16,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-census-quintiles.ts",
        "range": {
            "start": {
                "line": 18,
                "character": 48
            },
            "end": {
                "line": 18,
                "character": 75
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-ecpm-segment.ts",
        "range": {
            "start": {
                "line": 13,
                "character": 9
            },
            "end": {
                "line": 13,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-ecpm-segment.ts",
        "range": {
            "start": {
                "line": 15,
                "character": 37
            },
            "end": {
                "line": 15,
                "character": 64
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-exploration-criteria-segment.ts",
        "range": {
            "start": {
                "line": 5,
                "character": 9
            },
            "end": {
                "line": 5,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-exploration-criteria-segment.ts",
        "range": {
            "start": {
                "line": 7,
                "character": 52
            },
            "end": {
                "line": 7,
                "character": 79
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-exploration-results-segment.ts",
        "range": {
            "start": {
                "line": 16,
                "character": 9
            },
            "end": {
                "line": 16,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-exploration-results-segment.ts",
        "range": {
            "start": {
                "line": 27,
                "character": 3
            },
            "end": {
                "line": 27,
                "character": 30
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-geo-indexing-segment.ts",
        "range": {
            "start": {
                "line": 11,
                "character": 9
            },
            "end": {
                "line": 11,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-geo-indexing-segment.ts",
        "range": {
            "start": {
                "line": 13,
                "character": 44
            },
            "end": {
                "line": 13,
                "character": 71
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-poi-coverage-segment.ts",
        "range": {
            "start": {
                "line": 14,
                "character": 9
            },
            "end": {
                "line": 14,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-poi-coverage-segment.ts",
        "range": {
            "start": {
                "line": 17,
                "character": 44
            },
            "end": {
                "line": 17,
                "character": 71
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-proximity-poi-segment.ts",
        "range": {
            "start": {
                "line": 9,
                "character": 9
            },
            "end": {
                "line": 9,
                "character": 36
            }
        }
    },
    {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/inject-proximity-poi-segment.ts",
        "range": {
            "start": {
                "line": 12,
                "character": 45
            },
            "end": {
                "line": 12,
                "character": 72
            }
        }
    }
]


[Trace - 4:00:02 PM] Received response 'textDocument/codeLens - (7)' in 1560ms.
No result returned.


[Trace - 4:00:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/plan-route-state/country-query-parameter-name.ts",
    "diagnostics": []
}


[Trace - 4:00:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts",
    "diagnostics": []
}


[Trace - 4:00:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/plan-route-state/ooh-plan-route-state.service.ts",
    "diagnostics": []
}


[Trace - 4:00:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/plan-config-state/ooh-plan-config-state.service.ts",
    "diagnostics": []
}


[Trace - 4:00:02 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {
    "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/total-impression-av.ts",
    "diagnostics": []
}


[Trace - 4:00:02 PM] Sending request 'textDocument/foldingRange - (8)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts"
    }
}


[Trace - 4:00:02 PM] Received response 'textDocument/foldingRange - (8)' in 5ms.
Result: []


[Trace - 4:00:04 PM] Sending request 'textDocument/codeLens - (9)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts"
    }
}


[Trace - 4:00:04 PM] Received response 'textDocument/codeLens - (9)' in 3ms.
No result returned.


[Trace - 4:00:04 PM] Sending request 'textDocument/foldingRange - (10)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts"
    }
}


[Trace - 4:00:04 PM] Received response 'textDocument/foldingRange - (10)' in 4ms.
Result: []


[Trace - 4:00:12 PM] Sending request 'textDocument/foldingRange - (11)'.
Params: {
    "textDocument": {
        "uri": "file:///c%3A/Users/Shahar/Documents/repositories/ubiroot/node/web-apps/projects/polaris/src/app/ooh-planning/plan/edit/export/segments/_export-segment-definition.ts"
    }
}


[Trace - 4:00:12 PM] Received response 'textDocument/foldingRange - (11)' in 4ms.
Result: []

I also tried to look into nglangsvc.log immediately after this but I couldn't find what the relevant section (if any) is. So I uploaded the full file here: https://drive.google.com/file/d/1WaWy4rv8cEykcfKqnBEBYGP8ehCxj6Xx/view?usp=sharing (uploading here via github faileD)

🌍 Your Environment

Angular Version:



     _                      _                 ____ _     ___ 
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | | 
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | | 
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 20.1.4
Node: 20.19.4
Package Manager: yarn 1.22.22
OS: win32 x64

Angular: 20.1.4
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, router        

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.2001.4
@angular-devkit/build-angular   20.1.4
@angular-devkit/core            20.1.4
@angular-devkit/schematics      20.1.4
@schematics/angular             20.1.4
ng-packagr                      20.1.0
rxjs                            7.8.2
typescript                      5.8.3
zone.js                         0.15.0

Extension Version:


20.2.2

VSCode Version:


Version: 1.5.11 (user setup)
VSCode Version: 1.99.3
Commit: 2f2737de9aa376933d975ae30290447c910fdf40
Date: 2025-09-05T03:48:32.332Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.19045

(Note I am using Cursor but this happens in the OG VS Code as well)

Operating System:


Edition	Windows 10 Pro
Version	22H2
Installed on	‎3/‎23/‎2025
OS Build	19045.6216

Note that this also happened in another machine I have with windows 11.

Extension options:



```
"angular.log": "verbose",
"angular.trace.server": "verbose"
```
(I turned these on literally only for the logs I posted here)

Anything else relevant?

I'm not sure what are the conditions for this. I think probably not all users have it happen otherwise it would have been fixed long ago, but it happened to me on both of my machines and in more than one project. I was able to test it in a non-windows machine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions