Improve startup time by avoiding redundant downloads#72
Improve startup time by avoiding redundant downloads#72AhmmedSamier wants to merge 2 commits intonathansbradshaw:mainfrom
Conversation
…er version before downloading. Previously, the extension would attempt to install the Angular Language Server and TypeScript on every startup, causing significant delays. With this change, I check the `package.json` of the installed packages and only trigger a download or install if the installed version does not match the configured version or if the server file (`index.js`) is missing. This significantly improves startup time for subsequent runs.
…ad-7607323098698041179 Skip redundant Angular Language Server downloads
|
This smells a little bit like an AI Agent PR. not a bad thing, just want to confirm how you did it, and how it's been tested? |
|
Thanks for the PR and response @AhmmedSamier . I appreciate the work you and the community don't keep this plugin alive. I think to get this PR through getting a second set of verification that everything works would be nice. I don't work with angular anymore, so I'll defer the second set of eyes to someone with more recent experience |
|
Hi @nathansbradshaw 👋 I wanted to check in on the status of this PR. Could you share if there’s anything else needed to move it forward (e.g., additional verification/testing, adjustments to the changes, or a second reviewer)? I’d be happy to help with whatever is needed to get this merged. Thanks! |
|
@AhmmedSamier Some verification would be great and I'll review it later today to see if we can get it merged |
|
I'm sorry, I haven't had any time to look into this. @jpike88 do you have any availability to verify this and merge it in? |
|
@AhmmedSamier what happens if I have folder X opened which is a monorepo, and the package.json of interest is in subfolder Y (like a client/ directory)? Seems like that check is very brittle. I think at least:
|

Problem
Currently, the extension attempts to install/download the Angular Language Server and TypeScript packages every time the language server starts. This causes a significant delay on every startup, even if the packages are already installed and up-to-date.
Solution
This PR updates the startup logic to:
Check the package.json of the installed @angular/language-server and typescript packages in node_modules.
Compare the installed version with the requested version (or the latest version if configured as "latest").
Skip the download/install step if the versions match and the server file exists.
This drastically reduces startup time for subsequent runs while still ensuring the extension updates when the configured version changes.