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

Cancel initial file search if it takes too long #1242

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

Conversation

thecrypticace
Copy link
Contributor

@thecrypticace thecrypticace commented Feb 27, 2025

Fixes #986 (hopefully)

There's a lot of detail about the problem in the linked issue and my response at the bottom. But briefly:

  • Searches can take way too long; even spinning "forever" for some people
  • This occurs more often if following symlinks is enabled in VSCode
  • We can cancel in-flight searches

This PR starts the searches and cancels them after ~15s. If the extension hasn't found anything within 15s then it's likely it'll take ~15s any time you open that project and that would've been an absolutely horrible dev experience that we probably would've been notified about.

It seems reasonable to set a time limit on the search do determine if we need to start a language server

The presence of symlinks can cause ripgrep processes to spawn and run for a really long time on some systems and/or projects. We set an upper limit of 15s to search for files in a workspace before we cancell the process.
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.

tailwindcss-intellisense spawns ripgrep process that chews CPU on a project without Tailwindcss
1 participant