-
Notifications
You must be signed in to change notification settings - Fork 105
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
slow workspace/project loading and Open File By Name (Ctrl + P) #460
Comments
The open file fuzzy finder will be improved, I'll prioritize it for the next release after 0.3.8. Workspace scanning and search are not such low hanging fruits, so speed improvements there aren't likely to be dramatic, but we haven't done a proper optimisation pass, so some improvement is to be expected. However we don't intend to redesign the editor to support millions of files in the workspace, or very large files. This is the tradeoff to keep the internals simple and still cover 95% of use cases. |
Millions of files dont need to be supported, I agree. That is not a realworld usecase even. But upto 200K files should be supported. E.g., big repos like the chromium, llvm or the linux kernel have that many files. LLVM 19 on my system has Just for testing how fast it would be to recurse the same repository using std c++:
cold run:
I suggest using |
You think when scanning the workspace we're just getting the file list? No, we're opening each file, loading it into memory, scanning for newlines, tokenizing etc. That's how the editor works |
Is there a reason for doing this? Sounds incredibly wasteful. |
Ok thank you for answering. |
Describe the bug
Performance is poor when loading a project of around ~50k files. Loading the workspace takes more than 10 seconds. When the project has loaded, Ctrl+P file opening is slow and laggy as in, it takes a while before I can type in the next char. Initially the project had 200K files and everything was unusable, but then I ignored a lot of stuff so now its better but still the performance is very poor in these features.
Compared to this, fzf can handle around a million files with 0 lag and its written in go
Expected behavior
Be fast. At least for file opening, really its just 50K strings.
The text was updated successfully, but these errors were encountered: