Skip to content

improvement: Improve efficiency of completions #23355

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

Merged
merged 1 commit into from
Jun 12, 2025

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Jun 11, 2025

There are two improvements here:

  • isAbsent(force = false) which is already used in the codebase when we care about performance
  • we don't search for extension or implicit methods on empty query, as we would have inverseSemanticdb invoked on every possible extension method and it's quite inefficient

There are two improvements here:
- isAbsent(force = false) which is already used in the codebase when we care about performance
- we don't search for extension or implicit methods on empty query, as we would have inverseSemanticdb invoked on every possible extension method and it's quite inefficient
@tgodzik tgodzik requested a review from rochala June 11, 2025 15:38
Copy link
Contributor

@rochala rochala left a comment

Choose a reason for hiding this comment

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

Nice,

If we're trying to improve completions performance there is also one change that we could make:

Lsp provides an api to get information what triggered the completions. Based on that we could cache compiler completions and only compute ones from symbol search. Should save some time too

@tgodzik tgodzik merged commit 99543c5 into scala:main Jun 12, 2025
29 checks passed
@tgodzik tgodzik deleted the improve-results branch June 12, 2025 05:37
@WojciechMazur WojciechMazur added this to the 3.7.2 milestone Jun 18, 2025
tgodzik added a commit to scala/scala3-lts that referenced this pull request Jun 19, 2025
There are two improvements here:
- isAbsent(force = false) which is already used in the codebase when we
care about performance
- we don't search for extension or implicit methods on empty query, as
we would have inverseSemanticdb invoked on every possible extension
method and it's quite inefficient
[Cherry-picked 99543c5]
tgodzik added a commit to scala/scala3-lts that referenced this pull request Jun 20, 2025
There are two improvements here:
- isAbsent(force = false) which is already used in the codebase when we
care about performance
- we don't search for extension or implicit methods on empty query, as
we would have inverseSemanticdb invoked on every possible extension
method and it's quite inefficient
[Cherry-picked 99543c5]
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.

3 participants