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

[Performance] searching for a file by ctrl+p is really really slow #74598

Closed
wwm0609 opened this issue May 30, 2019 · 5 comments
Closed

[Performance] searching for a file by ctrl+p is really really slow #74598

wwm0609 opened this issue May 30, 2019 · 5 comments
Assignees
Labels
search Search widget and operation issues

Comments

@wwm0609
Copy link

wwm0609 commented May 30, 2019

Version: 1.34.0
Commit: a622c65
Date: 2019-05-15T21:55:35.507Z
Electron: 3.1.8
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Linux x64 4.15.0-47-generic

Disk type: HDD
File system: ext4
Project: Android/AOSP

Searching for certain java files is too slooooow!
BTW, using find -type -f -name ... in terminal only takes 4~5 seconds;
Really don't get the reason why vscode could be this slow? Doesn't it cache? then what it is doing exactly during file indexing when launching a project?

@vscodebot vscodebot bot added the search Search widget and operation issues label May 30, 2019
@wwm0609
Copy link
Author

wwm0609 commented May 30, 2019

already exlcuded the out folder and .repo folder:

    "files.exclude": {
        "out/*": true,
        ".repo/*":true,
        ".CCACHE/*":true,
        "cts/*":true,
    },
    "files.watcherExclude": {
        "out/*": true,
        ".repo/*":true,
        ".CCACHE/*":true,
        "cts/*":true,
    },

@roblourens
Copy link
Member

How long does it take? Is your project on a networked file share or something like that? Is text search also slow?

Also have some tips here: https://github.com/microsoft/vscode/wiki/Search-Issues#slow-search-rg-running-for-a-long-time-or-consuming-lots-of-cpumemory

@wwm0609
Copy link
Author

wwm0609 commented May 31, 2019

tooks long enough (more than 10 sec and no any search results) before I give up
the project is on my local disk;
Text search is ok;

@roblourens
Copy link
Member

So text search is much faster?

Also please do the following

  • Run the command "Set log level" and change it to "Trace"
  • Run the search again
  • Show the search-related messages in the "Log (Window)" output panel

image

@wwm0609
Copy link
Author

wwm0609 commented Jun 3, 2019

@roblourens Thanks for the reply.

After googled, found vscode native file picker uses rg (ripgrep) to search files (every time after the input pattern changed ?) which might not be fast enough for large projects, especially when the underlying disk is not ssd;
So I wrote my own file picker extension, and it meets my own requirement, so just close this issue now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
search Search widget and operation issues
Projects
None yet
Development

No branches or pull requests

2 participants