-
-
Notifications
You must be signed in to change notification settings - Fork 95
feat(config): add an option to fully disable queries #451
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
base: master
Are you sure you want to change the base?
Conversation
… workspaces where performance is an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaict, this will lead to us showing an empty tree in the target list.
Instead, we should hide the target list completely, if bazel queries are disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bazel queries are used in 3 contexts:
- In the background, to power codelens and goto definition
- Upon request, e.g. if a user ran the "Build Target" command
- When explicitly requested via command variables (configured as part of the tasks configuration)
I see how (1) can trigger a lot of background queries and can lead to unresponsiveness. As such, I do see why we would want to disable them.
For (3), I am pretty sure that we want to keep queries enabled, even if queries for (1) are disabled. After all, the user himself configured those exact queries in his own task configuration.
For (2), I am somewhat on the edge. Commands like "Build Target" need to be explicitly triggered by the user. As such, they don't negatively impact the experience by default. I think we might want to keep the Bazel queries for those enabeld, too
|
I'm catching up after some time off, thanks for the replies, will get back to you shortly in the feedback! |
cbandera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zachgrayio Considering Adrians comment #451 (comment) I think the better way would be to introduce enableXYZ config keys for the different features of this plugin to selectively enable or disable those parts that are causing problems or are unneeded.
The current approach renders the functionality broken, which causes a bad (because unclear) user experience
Adds an option to fully disable queries to support large workspaces where performance is an issue.
In many cases when using this extension in large monorepos, the option to simply disable the functionality that depends on query while keeping basics like syntax highlighting is desireable; this allows the user to avoid accumulating many costly and long running queries that end up consuming 100% of their machine's resource until manually exited, without resorting to uninstalling the plugin.
Related to #227