Skip to content

Conversation

zachgrayio
Copy link
Member

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

Copy link
Collaborator

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

Copy link
Collaborator

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:

  1. In the background, to power codelens and goto definition
  2. Upon request, e.g. if a user ran the "Build Target" command
  3. 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

@zachgrayio
Copy link
Member Author

I'm catching up after some time off, thanks for the replies, will get back to you shortly in the feedback!

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.

2 participants