-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Switch Source Header is very slow #231
Comments
+1 vote here. It takes sometimes over 30s to switch between a .cpp and its corresponding header. Even though both are currently opened. Typically the 2nd alt-O will be faster, but still far from instantaneous. |
I noticed that this happens only on Windows. On Linux with the same project (~400 source files) it switches instantly. |
Seeing this on both a mac (10.11.6) and Linux (ubuntu 16.04). |
Thanks for bringing this perf problem to our attention. I am able to repro it and I see the code that is taking a long time building a "file system tree", which doesn't scale well with lots of files. We'll investigate making this scenario faster in a future release. |
In all the setups I've used, the alternate file in either in the same dir or separated include/file.h,src/file.cpp. Maybe it would be faster to first check for those, before creating a file system tree? |
This should be fixed in 0.10.2. Please reopen if you continue to see the issue. |
Version 1.11 has seriously regressed this feature. in fact switching between header/code almost never works now :( |
@jyavenard What was your previous version of cpptools that was working? Is it red in the bottom right and does it say "Searching..." for #include headers that can't be found? Are the source/target files in the same folder? I assume slowness or switching to the wrong file isn't the problem and that the symptom is that no switching ever occurs? What OS are you using? We're not able to repro a problem so we need more info. It'd be better if you created a new bug, because this bug was about the original implementation which could take a long time to switch. The new implementation will generally fail to switch if the target file isn't added to the browse database for some reason, so deleting your .browse.vc.db or changing the databaseFilename property in the c_cpp_properties.json may fix the issue and cause the target file to be correctly re-added. |
@sean-mcmanus I don't know which version it was before. After reverting to 1.10 (due to issue #24052), it still no longer works. The bottom of my window are all in blue. Using 10.12.4 ... Yes, I think it's no longer slow, it just doesn't work at all anymore :) It was working a few days ago, nothing has been changed in my configuration in month.. will create a new bug |
(FWIW, I have no .browse.vc.db on my home directory) |
@jyavenard On Mac, the default .browse.vc.db location should be under |
I'm using vscode + cpptools with a very large codebase. When switching from .cpp to .h and back, vscode is very slow to respond the first time when toggling between files, especially when switching from .h back to .cpp. It takes seconds to complete, which makes it feel like the feature isn't working.
Can we have fast switching, or a more prominent visual indicator that signals that the process of switching is still "working on it."?
The text was updated successfully, but these errors were encountered: