Closed davidmatson closed 3 years ago
@davidmatson can you provide the complete log?
I had to re-install, so I may have a different version than before. It's now working on smaller projects. For larger projects, it's much slower than I recall. Specifically, it appears to get stuck here (not sure how long I'll have to wait):
[09:11:01 info.] (ext) Starting Format Files - Workspace
[09:11:01 info.] (config) config: {"extensionsToInclude":"*","excludePattern":"**/node_modules,**/.vscode,**/dist/**,**/.chrome","inheritWorkspaceExcludedFiles":true,"runOrganizeImports":false,"useGitIgnore":true}
[09:11:01 info.] (config) excluded files: {"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true}
[09:11:01 info.] (validate-in-workspace) found workspace folders: Test
[09:11:01 info.] (validate-in-workspace) workspace is valid!
[09:11:01 info.] (select-workspace-folder) a single workspace folder was found, selecting Test
[09:11:01 info.] (get-files) creating include glob
[09:11:01 info.] (get-files) **/*.*
[09:11:01 info.] (get-files) creating exclude glob
[09:11:01 info.] (get-files) including files.exclude globs
[09:11:01 info.] (get-files) {**/node_modules,**/.vscode,**/dist/**,**/.chrome,**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store}
[09:11:01 info.] (get-files) searching for files in workspace folder 'Test' include:**/*.* exclude:{**/node_modules,**/.vscode,**/dist/**,**/.chrome,**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store}
It finally came back over 30 minutes later (3256 total files in this project). I think it took maybe a few seconds before to figure out how many files there were to format. At the moment, it's unusably slow.
The original issue just repro'd again (running shortly after launching VS Code):
[20:53:50 info.] (config) config: {"extensionsToInclude":"*","excludePattern":"**/node_modules,**/.vscode,**/dist/**,**/.chrome","inheritWorkspaceExcludedFiles":true,"runOrganizeImports":false,"useGitIgnore":true}
[20:53:50 info.] (config) excluded files: {"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true}
[20:53:50 info.] (ext) activating
[20:53:50 info.] (ext) registering command formatFiles.start.workspace
[20:53:50 info.] (ext) registering command formatFiles.start.workspaceFolder
[20:53:50 info.] (ext) registering command formatFiles.start.fromGlob
[20:53:50 info.] (ext) activated
::::::::::::::::::::::::::::::::::::::::::::::::::
[20:53:50 info.] (ext) Starting Format Files - Workspace
[20:53:50 info.] (config) config: {"extensionsToInclude":"*","excludePattern":"**/node_modules,**/.vscode,**/dist/**,**/.chrome","inheritWorkspaceExcludedFiles":true,"runOrganizeImports":false,"useGitIgnore":true}
[20:53:50 info.] (config) excluded files: {"**/.git":true,"**/.svn":true,"**/.hg":true,"**/CVS":true,"**/.DS_Store":true}
[20:53:50 info.] (validate-in-workspace) found workspace folders: Test
[20:53:50 info.] (validate-in-workspace) workspace is valid!
[20:53:50 info.] (select-workspace-folder) a single workspace folder was found, selecting Test
[20:53:50 info.] (get-files) creating include glob
[20:53:50 info.] (get-files) **/*.*
[20:53:50 info.] (get-files) creating exclude glob
[20:53:50 info.] (get-files) including files.exclude globs
[20:53:50 info.] (get-files) {**/node_modules,**/.vscode,**/dist/**,**/.chrome,**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store}
[20:53:50 info.] (get-files) searching for files in workspace folder 'Test' include:**/*.* exclude:{**/node_modules,**/.vscode,**/dist/**,**/.chrome,**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store}
[20:53:51 info.] (get-files) Discovered 0 files to format
Thanks for the info, I tested with a large workspace and it is indeed very slow, I'll look into where the slowdown is coming from.
As far as 0 workspace files found, can you provide me other details such as OS, VSCode version? Are the files you are searching for listed in one of the exclude globs **/node_modules,**/.vscode,**/dist/**,**/.chrome,**/.git,**/.svn,**/.hg,**/CVS,**/.DS_Store
?
For the 0 workspace files found, the OS is the latest Windows 10 (21H1, build 19043.1083 with all updates installed; x64 Enterprise), and VS Code also looks like the latest version:
Version: 1.58.0 (user setup)
Commit: 2d23c42a936db1c7b3b06f918cde29561cc47cd6
Date: 2021-07-08T06:54:55.083Z (5 days ago)
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.19043
The files are not in any of the exclude globs - without changing the exclude settings, sometimes it works, sometimes it doesn't. (If it doesn't, it seems to get stuck until restarting VS Code.)
hey sorry for the delay, I published a new version just now using a much faster glob library, can you give that a try?
Yes, it finds the files to format almost instantly now. Thanks!
I can't get it to find any files, either using Start Format Files: From Glob or Start Format Files: From Workspace. The log always says