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

feat(perf): allow configuring search path #2952

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

pdecat
Copy link

@pdecat pdecat commented Dec 3, 2023

This PR allows configuring the path from which Home Assistant configuration files will be searched.

Empty by default, so all files in the workspace are still evaluated.

On large workspaces, setting this specifically to the path where configuration files are located can improve performance drastically. Path can be absolute or relative to the workspace root.

Also, I believe it resolves the 100% CPU usage and process not exiting after VSCode is closed behaviors reported several issues.

Comment on lines +47 to +49
console.log(`configurationService.url: ${configurationService.url}`)
console.log(`configurationService.searchPath: ${configurationService.searchPath}`)
console.log(`params.rootUri: ${params.rootUri}`)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helped a lot in understanding what was going on on startup.

TODO: remove this before merge if PR is accepted.

}
};
console.log(`rootUri: ${rootUri}`)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helped a lot in understanding what was going on on startup.

TODO: remove this before merge if PR is accepted.

@@ -58,18 +47,19 @@ export class VsCodeFileAccessor implements FileAccessor {
filelist: string[] = [],
): string[] {
subFolder = path.normalize(subFolder);
console.log(`fileAccessor.tf:getFilesInFolder:subFolder: ${subFolder}`);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This helped a lot in understanding what was going on on startup.

TODO: remove this before merge if PR is accepted.

@pdecat
Copy link
Author

pdecat commented Dec 16, 2023

Hi @keesschollaart81 @frenck, gentle ping :)

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

Successfully merging this pull request may close these issues.

1 participant