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

showFoundFiles should default to false #28

Open
ScrubN opened this issue Jul 15, 2024 · 6 comments
Open

showFoundFiles should default to false #28

ScrubN opened this issue Jul 15, 2024 · 6 comments
Labels

Comments

@ScrubN
Copy link

ScrubN commented Jul 15, 2024

The setting showFoundFiles adds 30+ seconds of waiting for the extension to explore my entire user folder every time its used (on an NVMe), and includes many useless files such as NTUSER.DAT.

Please consider defaulting the setting to false. I seriously thought the extension was broken until I found the setting in the git history.

@fabiospampinato
Copy link
Owner

Is this repo public / do you know how I could reproduce the problem in some way?

It's possible we may be exploring directories that shouldn't be explored, 30s sounds insane for pretty much any repo 🤔

@ScrubN
Copy link
Author

ScrubN commented Jul 15, 2024

I'm not using vscode from within a cloned repo, I'm just launching it with the start menu. That probably sets the working directly to my user folder, which is is over 400GB in size.

I tried profiling the extension, however it didn't provide much useful information because the JS has been minified. I can, however, see that about 10% of the extension's CPU time is spent collecting garbage though.

Here are some ideas I have for improving the issue:

  • Add a timeout to tiny-readdir-glob-gitignore (major)
  • Do not run the file discoverer when in the user folder (major)
  • Mutate state instead of making copies on hot paths in tiny-readdir-glob-gitignore (minor)
  • Mutate state instead of making copies on hot paths in tiny-readdir-glob (minor)

@fabiospampinato
Copy link
Owner

Oh I see, it should be fairly easily fixable, I think if you are not inside a repo avoiding searching recursively makes sense, also somebody may still expect that to happen when working on an uninitialized repo 🤔 having some kind of limit, either in depth or number of files, makes sense also.

@ScrubN
Copy link
Author

ScrubN commented Jul 15, 2024 via email

@ScrubN
Copy link
Author

ScrubN commented Jul 15, 2024

Another idea is to add dotdirs to the exclude array by default. I don't think many users would be expecting to have their .vscode or .rustup directories appear as diff targets by default. On my machine, my dotdirs make up about 1/10 of the total files in my user directory.

@fabiospampinato
Copy link
Owner

That's interesting 🤔 A need to update the extension, but potentially if you put a .gitignore or .ignore file in there, to exclude those folders, the extension could respect that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants