Closed kgartland-rstudio closed 1 month ago
A file watcher on the entire tree plus an action that creates 1000s of files equals :arrow_up:
A file watcher on the entire tree plus an action that creates 1000s of files equals ⬆️
We could potentially debounce. The file watcher itself cannot be, but we could wait a small amount of time to see if any other events come in. Even a 50ms wait could prevent us from making a lot of the calls above. That would be very hard for users to perceive as long as our files API returns quickly too.
Can look at the URI of the event, and ignore events for files/folders we ignore in the files view.
Verified that we are no longer making that many files requests.
I found this while testing venv's in VSCode.
STR: Open a python project Create a Destination and Configuration In the Command Pallet >
Python: Create Environment..
>Venv
>Ok
We start hammering the
files
endpoint while the environment is being created, once the environment is done, we stop sending api calls. This only happens if you already have a configuration file. If there is none, we don't see any of these calls happen: