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

[Language Server] Performance pitfalls of recursively searching for tsconfig.json #16

Closed
johnsoncodehk opened this issue Mar 6, 2023 · 0 comments

Comments

@johnsoncodehk
Copy link
Member

In the following line, the language server attempts to search for all tsconfigs from the workspace root directory. If the user attempts to start vscode from the system root directory and opens a vue file, this could lead to performance issues for the language server searching through the entire file system for tsconfigs.

const rootTsConfigs = new Set(sys?.readDirectory(uriToFileName(context.rootUri.toString()), rootTsConfigNames, undefined, ['**/*']).map(fileName => fileName.replace(/\\/g, '/') as path.PosixPath));

A better approach would be to attempt to search up for the tsconfig for each request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant