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

Stuck When Readinf Large compile_command.json #2586

Closed
xiaoyun94 opened this issue Jun 8, 2022 · 6 comments
Closed

Stuck When Readinf Large compile_command.json #2586

xiaoyun94 opened this issue Jun 8, 2022 · 6 comments
Labels
more info needed More info is needed from the community for us to properly triage and investigate. stale to use with the close-stale-issues bot

Comments

@xiaoyun94
Copy link
Contributor

xiaoyun94 commented Jun 8, 2022

Brief Issue Summary

if compile_command.json is too large (~100M), the cmake tools will be stucked, and vscode cannot work well

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.67.2",
  "cmtVersion": "1.10.5",
  "configurations": [
    {
      "folder": "/root/c_test",
      "cmakeVersion": "3.17.0",
      "configured": false,
      "generator": "Unix Makefiles",
      "usesPresets": false,
      "compilers": {
        "C": "/usr/bin/gcc",
        "CXX": "/usr/bin/g++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": false,
    "hasCodeModel": false,
    "activeBuildType": "",
    "buildTypesSeen": [],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 0,
    "executablesCount": 0,
    "librariesCount": 0,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": null
    }
  ]
}

Debug Log

No response

Additional Information

No response

@xiaoyun94
Copy link
Contributor Author

  • Generate Test Files
rm -rf sub_*
for num in {1..3000}  
do
mkdir -p sub_${num}
echo "" > "./sub_${num}/test_${num}.c"
done  

  • CMAKE FILE DEMO
file(GLOB_RECURSE SOURCE_FILES *.c)
file(GLOB DIRS sub_*)
#message("6666 ${SOURCE_FILES}")
include_directories(${DIRS})
add_library(test1 ${SOURCE_FILES})
···

@bobbrow
Copy link
Member

bobbrow commented Jun 9, 2022

Hi @xiaoyun94, could you please provide more information about what appears to be stuck for you? We tried to reproduce this using the scripts you provided (on Ubuntu 20.04 and WSL), but we're not seeing any obvious problems. Generating the project and loading the project outline seemed to respond in a reasonable amount of time.

@bobbrow bobbrow added the more info needed More info is needed from the community for us to properly triage and investigate. label Jun 9, 2022
@Worrador
Copy link

It must be the same as in #970.
Basically, it takes too long or too much resources to parse the compile_commands.json file and (for me, the cmaketool crashes).

@xiaoyun94
Copy link
Contributor Author

xiaoyun94 commented Jun 20, 2022

the log records the memory problem actually, i have solved the problem by restarting vscode after modifying bash_profile NODE_OPTIONS=--max-old-space-size=8192.
I hope to adding a custom config weather omiting read compile_commands.json
#2609
@bobbrow @Worrador

@github-actions
Copy link

This issue is now marked as 'stale' due to there being no activity on it for the past 30 days and being labelled 'more info needed'. Unless the 'stale' label is removed or the issue is commented on, this will be closed in 7 days. If you would like to make this issue exempt from getting stale, please remove the 'more info needed' and 'stale' labels or add the 'stale-exempt' label

@github-actions github-actions bot added the stale to use with the close-stale-issues bot label Oct 18, 2023
@github-actions
Copy link

This issue is now closed due to there being no activity on it for the past 7 days since being marked as 'stale'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more info needed More info is needed from the community for us to properly triage and investigate. stale to use with the close-stale-issues bot
Projects
None yet
Development

No branches or pull requests

3 participants