microsoft / microsoft/vscode-cmake-tools

[Bug] Building Code Via CMake Tools extension is suddently very slow

Open
#5,098 3 comments 0 reactions 0 assignees View on GitHub
bug more info needed
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

When doing a build with the CMake Tools extension, the build itself is done rather fast, though, the CMake Tools extension is still doing something that it takes a rather long time (minutes) before the 'Building: ...' notification disappears. Downgrading from 1.24.42 to 1.23.52 solves the problem.

### CMake Tools Diagnostics

```shell
{
"os": "linux",
"vscodeVersion": "1.137.0",
"cmtVersion": "1.24.42",
"configurations": [
{
"folder": "/workspaces/dev-mega",
"cmakeVersion": "4.1.3",
"configured": true,
"generator": "Ninja",
"usesPresets": true,
"compilers": {}
}
],
"cpptoolsIntegration": {
"isReady": false,
"hasCodeModel": false,
"activeBuildType": "",
"buildTypesSeen": [],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 0,
"executablesCount": 0,
"librariesCount": 0,
"targets": []
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": true
}
]
}
```

### Debug Log

```shell
...
[driver] Build completed: 00:00:47.218
[cmakefileapi-parser] Read reply folder: /workspaces/dev-mega/.out/devel-clang/.cmake/api/v1/reply
cmakefileapi-parser] Found index files: ["cache-v2-33b7b14884d77cad3eea.json","cmakeFiles-v1-ca0d7e3323ed67847fb9.json","codemodel-v2-2d4f55b66080b69889b1.json", ...]
[build] Build finished with exit code 0
[driver] NOTE: You are testing with preset devel-clang, but there are some overrides being applied from your VS Code settings.
[extension] [1269] cmake.build finished (returned 0)
```

### Additional Information

The array in "Found index files" contains 2352 entries.

All the time is spent between the "[driver] NOTE: You are testing with preset devel-clang, but there are some overrides being applied from your VS Code settings." entry and the "[extension] [1269] cmake.build finished (returned 0)" entry.

Contributor guide

Open the contributing guide

Research direction

Reproduce the build with CMake Tools 1.24.42 on Linux using the reported VS Code, CMake, Ninja, and preset configuration, then compare it with 1.23.52. Start around the cmake.build completion path and the CMake file API parser after the build log; done means the successful build notification clears without the reported multi-minute delay.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
build-system, developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.