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

Autocomplete: Don't delay completions for cached entries #3138

Merged
merged 4 commits into from
Feb 13, 2024

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Feb 12, 2024

Right now, about 15% of all suggested completions originate from our cache (actually quite nice considering we are aggressively invalidating the cache e.g. when rejecting completions).

However, I noticed that these have a P75 duration of ~125ms which is caused by the debounce time + retrieval time. We can check the cache before we do any of this work though to remove the latency of cached entries completely.

Test plan

  • Updated the unit tests
  • Stepped into it with a debugger to see the right breakpoints are triggered

Copy link
Member

@valerybugakov valerybugakov left a comment

Choose a reason for hiding this comment

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

Haha, are you a genius or what? Awesome catch!

vscode/src/completions/request-manager.test.ts Outdated Show resolved Hide resolved
@philipp-spiess philipp-spiess merged commit d8bb720 into main Feb 13, 2024
15 checks passed
@philipp-spiess philipp-spiess deleted the ps/ac-no-delay-for-cached-entries branch February 13, 2024 10:01
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.

None yet

2 participants