-
Notifications
You must be signed in to change notification settings - Fork 101
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
Searching for keywords crashes VS Code #55
Comments
Got the same issue here on Fedora 26 and VS Code 1.15.1. Unfortunately that makes this extension just useless to me. |
Update on my previous comment: after reducing |
Does look like it, I'm not familiar with how VSCode handles these operations, but I think this loop should be a promise sequence, I think I'll test on that assumption soon. |
So i tried this on my local machine, with 200k included files, 10k included files and 500 files, which i believe to be a realistic amount for a small/mid-tier project. My finding for now is - as i suspected - the syncronous loop over all those found files causes the application to crash. As long the files searched for are in a reasonable amount (10k - wich is probably way over the top - worked all fine, and was done in a couple seconds), the |
I have the same problem on ubuntu 16.04 and VS Code 1.18.1. After a little dig into the code, I find a suspicious code here Actually, there are double for loop: one is loop for totalFiles, the other is loop for file.lineCount. Says, if there are 1000 files with average 1000 lines, the total number of .match operation is 1000,000. This is a O(N^2) time complexity. But if I use build-in ctrl+shift+F search for TODO, there is no problem. So, maybe one can use the build-in search in file API to replace searchAnnotationInFile function. |
This can also be triggered by various extensions: I had to disable PHP IntelliSense, Angular productivity pack and ESLint. All of these iterate through existing files and seem to interfere the |
Using the search functionality crashes VS Code on my machine.
VS Code Version: 1.14.1
OS Version: Ubunutu 16.04 LTS x64
This might be related to #35, although for me it never completes because of the crash.
Select command:
Command executing:
VS Code crashes:
The text was updated successfully, but these errors were encountered: