You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS Code Version: 1.41.1
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T15:04:31.999Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Linux x64 4.15.0-76-generic
The behavior is still there if I disable all extensions except C/C++
To Reproduce
I have a Workspace with 87000 files, 12500 of these are cpp/h files
I have my Workspace open
Ctrl+P to open SemanticModule.cpp (for example, I have the same issue with all files)
I use my hotkey for: "Go to Symbol in File" aka "workbench.action.gotoSymbol"
It takes 56 seconds to show the list of symbols (on my CoreI9 with 64 GB of memory)
next time it shows up directly
add an empty row in the file
goto point 3 above
Expected behavior
It shouldn't take much longer to find the symbols in a file than it takes to compile the file.
Additional context
I tried turning on logging like this, but didn't get any output.
("C_Cpp.loggingLevel": "Debug" in settings.json).
But I'm very willing to provide more information.
Well that funny, I think I found a workaround just moments after submitting this issue, I had both a compile_commands.json and as fallback (I thought) I also have a rather wide includePath. If I removed the includePath it just take a couple of seconds.
The includePath might be copied over to the browse.path setting, which is used to generate global symbols and a filename cache -- the initial one-time slowness could be caused by the generation of these caches -- a similar issue was reported at #1127 .
I don't understand steps 6-7...are you saying the slowness repeats after those steps? This is a one-time delay, right?
Sounds like you're hitting a different issue from the other one. Did you see logging in the C/C++ pane: see https://code.visualstudio.com/docs/cpp/enable-logging-cpp ? You can also run C/C++: Log Diagnostics to get info on the IntelliSense settings used by the current translation unit.
The issue didn't repro for me with just that 1 file. It's possible the processing is stuck due to IntelliSense blocking our input queue or tag parsing.
Unfortunately I can't share all of my code, but I guess that the amount of
files targeted by my include statements must matter. I will try the logging
instructions.
On Fri, 7 Feb 2020 at 21:57, Sean McManus ***@***.***> wrote:
Sounds like you're hitting a different issue from the other one. Did you
see logging in the C/C++ pane: see
https://code.visualstudio.com/docs/cpp/enable-logging-cpp ? You can also
run C/C++: Log Diagnostics to get info on the IntelliSense settings used by
the current translation unit.
The issue didn't repro for me with just that 1 file. It's possible the
processing is stuck due to IntelliSense blocking our input queue or tag
parsing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4934?email_source=notifications&email_token=AAA5YCWGHIBT52S43EA4AQ3RBXDLBA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELESN6Y#issuecomment-583608059>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5YCSH7VDPNW2U5J4KN73RBXDLBANCNFSM4KRKSHUQ>
.
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
output.zip
Well unfortunately, the log output doesnt tell the true story.
When I add an empty row and opens Go to Symbols in file, the log shows this;
sending 1 changes to server
cpptools/cpptools_finishUpdateSquiggles
Error squiggle count: 0
Update IntelliSense time (sec): 0.742
Database safe to open
but the progressbar continues 50 more seconds until the content is shown-
Well the output of the Log Diagnostics command didn't give much new
information I think:
-------- Diagnostics - 2/11/2020, 8:12:30 AM
Version: 0.26.3
Current Configuration:
{
"name": "Linux",
"browse.path": [
"${workspaceFolder}/**",
"/home/bjornca/src/develop/artifacts/**"
],
"defines": [],
"compileCommands": "${workspaceFolder}/intermediate/compile_commands.json",
"compilerPath": "/usr/bin/clang++-6.0",
"cStandard": "c11",
"cppStandard": "c++14",
"compilerArgs": [],
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
No active translation units.
On Mon, 10 Feb 2020 at 21:08, Sean McManus ***@***.***> wrote:
The C/C++: Log Diagnostics command can be run via the Command Palette in
VS Code.
Yeah, if your database is 3.9 GB that could cause performance issues when
we do operations that span the entire workspace.
We don't need your database file to diagnose the performance issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4934?email_source=notifications&email_token=AAA5YCRKXTLBTR47PSWEMKLRCGX2RA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCMRQ#issuecomment-584328774>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5YCUHUE4HJ5ZR2O4SLJDRCGX2RANCNFSM4KRKSHUQ>
.
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
Just removing the database and letting it rebuild by itself was not a very
good idea apparently, it makes goto symbol in file fast, but
then C_Cpp.SwitchHeaderSource doesnt work until I first manually open the
file I want to switch to.
If I put back the big database the h/cpp switch works again, but then it is
to painful finding the method I'm looking for. 😖
Can I try to rebuild the database perhaps to check if the reason might be
that it has been corrupted in some way perhaps?
On Tue, 11 Feb 2020 at 08:14, Björn Carlsson ***@***.***> wrote:
Well the output of the Log Diagnostics command didn't give much new
information I think:
-------- Diagnostics - 2/11/2020, 8:12:30 AM
Version: 0.26.3
Current Configuration:
{
"name": "Linux",
"browse.path": [
"${workspaceFolder}/**",
"/home/bjornca/src/develop/artifacts/**"
],
"defines": [],
"compileCommands": "${workspaceFolder}/intermediate/compile_commands.json",
"compilerPath": "/usr/bin/clang++-6.0",
"cStandard": "c11",
"cppStandard": "c++14",
"compilerArgs": [],
"browse": {
"limitSymbolsToIncludedHeaders": true
}
}
No active translation units.
On Mon, 10 Feb 2020 at 21:08, Sean McManus ***@***.***>
wrote:
> The C/C++: Log Diagnostics command can be run via the Command Palette in
> VS Code.
>
> Yeah, if your database is 3.9 GB that could cause performance issues when
> we do operations that span the entire workspace.
>
> We don't need your database file to diagnose the performance issue.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#4934?email_source=notifications&email_token=AAA5YCRKXTLBTR47PSWEMKLRCGX2RA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCMRQ#issuecomment-584328774>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAA5YCUHUE4HJ5ZR2O4SLJDRCGX2RANCNFSM4KRKSHUQ>
> .
>
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost ***@***.***
Blog http://hackerbaloo.blogspot.com/
____________________________
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
Well, I tried what I think is the official way, "C/C++: Reset Intellisence
Database" and then "C/C++: Rescan Workspace" but then
C_Cpp.SwitchHeaderSource still doesn't work. Should I open a new issue on
that?
On Tue, 11 Feb 2020 at 08:26, Björn Carlsson ***@***.***> wrote:
Just removing the database and letting it rebuild by itself was not a very
good idea apparently, it makes goto symbol in file fast, but
then C_Cpp.SwitchHeaderSource doesnt work until I first manually open the
file I want to switch to.
If I put back the big database the h/cpp switch works again, but then it
is to painful finding the method I'm looking for. 😖
Can I try to rebuild the database perhaps to check if the reason might be
that it has been corrupted in some way perhaps?
On Tue, 11 Feb 2020 at 08:14, Björn Carlsson ***@***.***>
wrote:
> Well the output of the Log Diagnostics command didn't give much new
> information I think:
> -------- Diagnostics - 2/11/2020, 8:12:30 AM
> Version: 0.26.3
> Current Configuration:
> {
> "name": "Linux",
> "browse.path": [
> "${workspaceFolder}/**",
> "/home/bjornca/src/develop/artifacts/**"
> ],
> "defines": [],
> "compileCommands":
> "${workspaceFolder}/intermediate/compile_commands.json",
> "compilerPath": "/usr/bin/clang++-6.0",
> "cStandard": "c11",
> "cppStandard": "c++14",
> "compilerArgs": [],
> "browse": {
> "limitSymbolsToIncludedHeaders": true
> }
> }
> No active translation units.
>
>
>
> On Mon, 10 Feb 2020 at 21:08, Sean McManus ***@***.***>
> wrote:
>
>> The C/C++: Log Diagnostics command can be run via the Command Palette in
>> VS Code.
>>
>> Yeah, if your database is 3.9 GB that could cause performance issues
>> when we do operations that span the entire workspace.
>>
>> We don't need your database file to diagnose the performance issue.
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#4934?email_source=notifications&email_token=AAA5YCRKXTLBTR47PSWEMKLRCGX2RA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELKCMRQ#issuecomment-584328774>,
>> or unsubscribe
>> <https://github.com/notifications/unsubscribe-auth/AAA5YCUHUE4HJ5ZR2O4SLJDRCGX2RANCNFSM4KRKSHUQ>
>> .
>>
>
>
> --
> ____________________________
> Björn Carlsson
> Telefon 0704-10 69 77
> Epost ***@***.***
> Blog http://hackerbaloo.blogspot.com/
> ____________________________
>
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost ***@***.***
Blog http://hackerbaloo.blogspot.com/
____________________________
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
Log Diagnostics shows "no translation unit" -- that means no IntelliSense is running. Do you have the source file active?
If SwitchHeaderSource (or Go to Def or Find All Refs) doesn't work until you open a file, it means the file wasn't parsed, probably because it wasn't included from the includePath (or browse.path) setting. You can use files.exclude to exclude folders you don't need to make the database smaller.
You can also set C_Cpp.loggingLevel to view diagnostic info in the C/C++ pane on what files are getting "tag parsed".
Also, if you're using compile_commands.json, it will try to get includePaths from that, but you may need to set your browse.path setting to include all the folders that you want to be parsed for global symbols (see #1715 ).
On Tue, 11 Feb 2020 at 20:33, Sean McManus ***@***.***> wrote:
Also, if you're using compile_commands.json, it will try to get
includePaths from that, but you may need to set your browse.path setting to
include all the folders that you want to be parsed for global symbols (see
#1715 <#1715> ).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4934?email_source=notifications&email_token=AAA5YCSHFTWX2DKZYH2YXMTRCL4RJA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELNYJDY#issuecomment-584811663>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5YCQQXBVUVZUJKJG7TADRCL4RJANCNFSM4KRKSHUQ>
.
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
And the h files I want to switch to are definitely included in the include
paths. Both from compile_commands.json and from browse.path. And I don't
get any squiggles for bad includes.
The include shown from C/C++: Log Diagnostics are from compile_commands.json and not the same used for workspace symbol searching/parsing (from browse.path), e.g. I don't see the develop/server folder under the browse.path. Can you add those folders or was that the cause of the large database?
If you set C_Cpp.loggingLevel to "Debug" you can see more diagnostics on the browse.path affect.
On Wed, 12 Feb 2020 at 21:38, Sean McManus ***@***.***> wrote:
The include shown from C/C++: Log Diagnostics are from
compile_commands.json and not the same used for workspace symbol
searching/parsing (from browse.path), e.g. I don't see the develop/server
folder under the browse.path. Can you add those folders or was that the
cause of the large database?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4934?email_source=notifications&email_token=AAA5YCV5ZM6DI7GOXMOFZ43RCRM4PA5CNFSM4KRKSHU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELSJRCA#issuecomment-585406600>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA5YCUPL3IRZ3GDSSZ5BELRCRM4PANCNFSM4KRKSHUQ>
.
--
____________________________
Björn Carlsson
Telefon 0704-10 69 77
Epost mailto://b.r.carlsson@gmail.com
Blog http://hackerbaloo.blogspot.com/
Your usage of "browse.path" appears incorrect -- it should be
"browse": {
"path": [
]
}
i.e. you can add the "path" property next to your existing limitSymbolsToIncludedHeaders property.
Have you been able to see the "C/C++" debug logging yet to see what files are getting "tag" parsed? That info can help diagose issues with an incorect browse.path.
80 MB seems too small if you have a really large workspace, but the 3.9 GB might lead to performance issues. You might want to use "${workspaceFolder}/*" (non recursive) and "${workspaceFolder}/subfolder" to specify fewer directories for symbols or add folders to files.exclude.
I have now adjusted and trimmed my browsing settings. and the result is a 346 MB DB. Attached also the output when all files are tag parsed after a reset of the DB.
But for some reason when I now execute "Go to Symbols in File" the progress never seems to stop.
And then I tested a restart of Code, and now it works fine. Case closed I guess.
Activity
HackerBaloo commentedon Feb 7, 2020
Well that funny, I think I found a workaround just moments after submitting this issue, I had both a compile_commands.json and as fallback (I thought) I also have a rather wide includePath. If I removed the includePath it just take a couple of seconds.
sean-mcmanus commentedon Feb 7, 2020
The includePath might be copied over to the browse.path setting, which is used to generate global symbols and a filename cache -- the initial one-time slowness could be caused by the generation of these caches -- a similar issue was reported at #1127 .
I don't understand steps 6-7...are you saying the slowness repeats after those steps? This is a one-time delay, right?
HackerBaloo commentedon Feb 7, 2020
Yes it the slowness was repeated after every time I added or removed an empty row in the file and then ran the command again.
sean-mcmanus commentedon Feb 7, 2020
Sounds like you're hitting a different issue from the other one. Did you see logging in the C/C++ pane: see https://code.visualstudio.com/docs/cpp/enable-logging-cpp ? You can also run C/C++: Log Diagnostics to get info on the IntelliSense settings used by the current translation unit.
The issue didn't repro for me with just that 1 file. It's possible the processing is stuck due to IntelliSense blocking our input queue or tag parsing.
HackerBaloo commentedon Feb 8, 2020
HackerBaloo commentedon Feb 8, 2020
output.zip
Well unfortunately, the log output doesnt tell the true story.
When I add an empty row and opens Go to Symbols in file, the log shows this;
but the progressbar continues 50 more seconds until the content is shown-
HackerBaloo commentedon Feb 8, 2020
And today when I test again my workaround to remove the includePath setting doesn help anymore,
5 remaining items
HackerBaloo commentedon Feb 11, 2020
HackerBaloo commentedon Feb 11, 2020
HackerBaloo commentedon Feb 11, 2020
sean-mcmanus commentedon Feb 11, 2020
Log Diagnostics shows "no translation unit" -- that means no IntelliSense is running. Do you have the source file active?
If SwitchHeaderSource (or Go to Def or Find All Refs) doesn't work until you open a file, it means the file wasn't parsed, probably because it wasn't included from the includePath (or browse.path) setting. You can use files.exclude to exclude folders you don't need to make the database smaller.
You can also set C_Cpp.loggingLevel to view diagnostic info in the C/C++ pane on what files are getting "tag parsed".
You could file a new issue if you want.
sean-mcmanus commentedon Feb 11, 2020
Also, if you're using compile_commands.json, it will try to get includePaths from that, but you may need to set your browse.path setting to include all the folders that you want to be parsed for global symbols (see #1715 ).
HackerBaloo commentedon Feb 12, 2020
HackerBaloo commentedon Feb 12, 2020
sean-mcmanus commentedon Feb 12, 2020
The include shown from C/C++: Log Diagnostics are from compile_commands.json and not the same used for workspace symbol searching/parsing (from browse.path), e.g. I don't see the develop/server folder under the browse.path. Can you add those folders or was that the cause of the large database?
If you set C_Cpp.loggingLevel to "Debug" you can see more diagnostics on the browse.path affect.
HackerBaloo commentedon Feb 13, 2020
sean-mcmanus commentedon Feb 13, 2020
Ah, okay.
Your usage of "browse.path" appears incorrect -- it should be
i.e. you can add the "path" property next to your existing limitSymbolsToIncludedHeaders property.
Have you been able to see the "C/C++" debug logging yet to see what files are getting "tag" parsed? That info can help diagose issues with an incorect browse.path.
80 MB seems too small if you have a really large workspace, but the 3.9 GB might lead to performance issues. You might want to use "${workspaceFolder}/*" (non recursive) and "${workspaceFolder}/subfolder" to specify fewer directories for symbols or add folders to files.exclude.
HackerBaloo commentedon Feb 14, 2020
latest.zip
I have now adjusted and trimmed my browsing settings. and the result is a 346 MB DB. Attached also the output when all files are tag parsed after a reset of the DB.
But for some reason when I now execute "Go to Symbols in File" the progress never seems to stop.
And then I tested a restart of Code, and now it works fine. Case closed I guess.
sean-mcmanus commentedon Feb 14, 2020
Go to Symbol in File could get stuck if our parsing queue is backed up with work. Let us know if you find a consistent repro.
fearthecowboy commentedon Feb 13, 2024
A significant update to Go To Symbol has been published in the insiders build - see #11557