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

CMake Tools wants to configure non-CMake projects #2127

Closed
jeffbi opened this issue Sep 17, 2021 · 37 comments
Closed

CMake Tools wants to configure non-CMake projects #2127

jeffbi opened this issue Sep 17, 2021 · 37 comments
Labels
bug a bug in the product Feature: activation related to extension activation
Milestone

Comments

@jeffbi
Copy link

jeffbi commented Sep 17, 2021

Brief Issue Summary

CMake Tools wants to configure non-CMake projects.

Expected:

CMake Tools should not attempt to inject itself into non-CMake projects.

Apparent Behavior:

When I open a directory in VS Code that is not a CMake project, such as a directory full of .tex files, I get a prompt asking me if I want to configure the project. After dismissing the prompt I get a message saying that the CMakeLists.txt file is missing.

Platform and Versions

  • Operating System: Linux Mint
  • CMake Version: 3.7.2
  • VSCode Version: 1.60.1
  • CMake Tools Extension Version: 1.8.1
  • Compiler/Toolchain:
@bobbrow
Copy link
Member

bobbrow commented Sep 17, 2021

Is there a CMakeLists.txt file buried somewhere deep in your project? Or is the folder you opened very large? VS Code will activate our extension if it finds a CMakeLists.txt anywhere in your folder, or if it "times itself out" looking for one. Because VS Code does not currently tell us why it activated us, we can only assume that it was because a CMakeLists.txt was found or one of our commands was invoked.

When you dismissed the prompt, did you click the 'x' or did you click "Don't show again"? We will do our best to be non-invasive if you don't need the CMake stuff turned on, but it sounds like there's one more message we could potentially remove.

@bobbrow bobbrow added bug a bug in the product Feature: activation related to extension activation labels Sep 17, 2021
@jeffbi
Copy link
Author

jeffbi commented Sep 17, 2021

No CMakeLists.txt files in the projects. In one case, on Linux, the folder has only two sub-directories which contain only .tex and .pdf files. In another case, on WIndows 10, the folder the top of a javascript/React project, that has no CMakeLists.txt files.

I have been dismissing the prompt via the 'x', because I kept meaning to file this issue and I wanted to be able to re-create it.

@bobbrow
Copy link
Member

bobbrow commented Sep 17, 2021

Thanks for the extra info. We don't control the activation of our extension besides declaring to VS Code which events we want to trigger activation. The file based activation events are:

    "workspaceContains:**/CMakeLists.txt",
    "workspaceContains:.vscode/cmake-kits.json"

Getting a "reason" for activation is an open request for the VS Code team: microsoft/vscode#44711

I remember reading about one extension author using a workaround for the ** in workspaceContains is to scope the search to only a few folders using several non-recursive *(/*)+ items. I would think it unlikely that would solve your case for the two-directory project, but I'm willing to build you a version of the extension with that logic in it if you are willing to try it out. Does this happen every single time you open those folders?

@jeffbi
Copy link
Author

jeffbi commented Sep 20, 2021

It appears that it is happening every time. I just opened three instances of VSCode, each by opening a folder, and each with TeX-ish projects. The extension wanted to configure all three. Two are flat, containing only .tex, .pdf and .sty files. The other contains only sub-directories, no files at the top level, and just a single level of sub-directories.

If trying a custom build will help you out I'm certainly willing to give it a try.

@bobbrow
Copy link
Member

bobbrow commented Sep 20, 2021

I built a new CMake Tools with this logic in it. To install it:

  1. Download the build artifact: https://github.com/microsoft/vscode-cmake-tools/suites/3821599735/artifacts/94571790
  2. Unzip the VSIX file
  3. Run the "Install From VSIX" command and select the VSIX file

If that fixes it for you, we can commit it to the extension.

@jeffbi
Copy link
Author

jeffbi commented Sep 21, 2021

Well, it might have helped a little. This time I launched VSCode and it opened my three tex project instances, and only one of the three prompted me to configure the project. That project, for what it's worth, has no subdirectories.

@jeffbi
Copy link
Author

jeffbi commented Sep 21, 2021

Actually, looking at my editors, it probably was two that had CMake prompts. Two of the three instances have the CMake extension information in the status bar.

@bobbrow
Copy link
Member

bobbrow commented Sep 21, 2021

That's weird. If you 'x' out of the configure prompt and cmake.sourceDirectory is not set and there's no CMakeLists.txt in the root folder, the status bar stuff goes away. Do you have a multi-root workspace and one of the folders meets the criteria to activate CMake Tools?

@jeffbi
Copy link
Author

jeffbi commented Sep 21, 2021

In this case I didn't 'x' out the configure prompt, nor dismiss it at all, which my explain why the status bar stuff remained. I had opened another VSCode instance with a C++ project to make sure the custom extension still worked on that. The prompt dialogs went away on their own while I was doing that.

I don't have any multi-root workspaces. The two tex project that showed the prompt are both under a ~/Projects directory, but the directories I actually opened are each a couple of levels down from there.

@DPChristoph
Copy link

On my system, it appears that it is the extension "CMake Test Explorer" that triggers the loading of CMake Tools, even when opening completely empty folders with VSCode.

Details

I have the same issue: Whenever I open a non-CMake folder in VSCode, even a completely empty folder, the plugin gives the message

CMakeLists.txt was not found in the root of the folder '(...)'. How would you like to proceed? [Create] [Locate] [Don't show again]

As far as I am aware, this only started about 1-2 weeks ago, possibly linked to an update of VSCode. I arrived here in an attempt to figure out if there was a new setting introduced in VSCode or cmake-tools that triggers this behavior.

While writing this and with the above comments in mind, I started wondering if this can be traced back to global VSCode settings. I found and commented out the following lines in settings.json,

    "cmake.configureOnOpen": true,
    "[cmake]": {},
    "cmake.buildDirectory": "${workspaceRoot}/build/${buildType}",
    "cmake.debugConfig": {
        "stopAtEntry": false,
        "MIMode": "lldb",
        "miDebuggerPath": "(...)",
        "logging": {
            "trace": true,
            "engineLogging": true,
            "traceResponse": true
        }
    },

I still get a message when opening an empty folder, but this time it changed to

Would you like to configure project '(...)' [Yes] [Not now].

When I click "Not now", I again get the same message of "CMakeLists.txt was not found...", together with the possibility to set a setting to "Configure projects on opening?". If I click "Never" here, settings.json is modified and I am back to the previous behavior.

So the intermediate conclusion is that cmake-tools is just always loaded for some reason.

I then thought that I would try to un- and reinstall cmake-tools to see what happens. In the process, the extension "CMake Test Explorer" complained that "CMake integration is enabled but the CMake Tools extension is not installed". And indeed, disabling that extension let me open empty folders without loading cmake-tools. After reenabling CMake Test Explorer, the cmake-tools messages reappeared.

@jeffbi
Copy link
Author

jeffbi commented Sep 22, 2021

Interesting. In my case, the CMake Test Explorer extension is not installed on any of my systems.

@bobbrow
Copy link
Member

bobbrow commented Sep 22, 2021

@DPChristoph it looks like the CMake Test Explorer activates on all events (*) and also activates the CMake Tools extension unconditionally. It sounds like a bug that they should fix. It's another reason we'd love to get an activation "reason" from VS Code.

@jeffbi you may not have this extension, but do you have any other CMake-related extensions? Does this problem happen when you disable any of those other extensions?

@jeffbi
Copy link
Author

jeffbi commented Sep 22, 2021

I have the CMake extension from twxs installed. When I uninstalled CMake Tools prior to installing the custom build that extension was uninstalled as well. Installing the custom build re-installed the CMake extension

@jeffbi
Copy link
Author

jeffbi commented Sep 22, 2021

I just disabled the CMake extension and restarted. All three VSCode instances, each with a tex project, were prompted to configure with CMake Tools and all three have the CMake tools items in the status bar.

@bobbrow
Copy link
Member

bobbrow commented Sep 22, 2021

What custom build are you referring to? What is the name of the extension? The behavior you're describing sounds like you have an extension that took a dependency on CMake Tools in its manifest. If that is the case, then CMake Tools will be activated any time that extension activates.

@jeffbi
Copy link
Author

jeffbi commented Sep 22, 2021

Two days ago you pointed me at a build with some new work-around logic.

@bobbrow
Copy link
Member

bobbrow commented Sep 22, 2021

Got it. I misunderstood what you wrote. The CMake extension that co-installs with ours does not activate us. Do you have any other extensions installed?

@jeffbi
Copy link
Author

jeffbi commented Sep 23, 2021

Several. C/C++, CMake, CMake Tools, EditorConfig, hexdump, Jupiter, Jupiter Keymap, LaTeX Workshop, Pylance, Python, and vscode-icons.

@darkvertex
Copy link

I have also been having this annoyance. I don't have a CMakeLists.txt in this Golang project I opened and yet it keeps asking about it.

I ended up disabling the extension for each non-C++ vscode workspace, but wish I didn't need to.

@bl0ggy
Copy link

bl0ggy commented Sep 29, 2021

I have been having this issue for years already and I'm getting very tired of this.
Why is it searching in every subdirectories ?
A "CMake project" should be a project that contains a CMakeLists.txt in its root folder isn't it ?
If not, it can't be considered as a CMake project as this folder may contains many subfolders, each one having a CMake project, the user would then have to open these folders separately (or as workspace folders).

Is it possible to limit to only the root folder ?
Is it possible to add a setting either to enable/disable this or to choose how many subfolder levels we want to search (which would dynamically add as many *(/*)+ as wanted in workspaceContains) ?

@bobbrow
Copy link
Member

bobbrow commented Sep 29, 2021

We used to limit only to the root folder but got feedback that that was not the desired behavior because even if someone set cmake.sourceDirectory to a subfolder, our extension would not activate automatically. Some developers do open folders above their root CMakeLists.txt.

I think it would be fine to limit the search to a few folders, but as @jeffbi points out, the extension is still being activated.

And unfortunately we can't add a setting to select the number of folders to search. That is part of the package manifest (package.json) and VS Code isn't happy with extensions that try to change it dynamically.

I just discovered the Developer: Startup Performance command in VS Code. If you can run that command on a workspace that activated CMake Tools when you didn't want it to and share the results with us, that should give us some better clues as to why CMake Tools is being activated.

@darkvertex
Copy link

darkvertex commented Sep 29, 2021

I just discovered the Developer: Startup Performance command in VS Code. If you can run that command on a workspace that activated CMake Tools when you didn't want it to and share the results with us, that should give us some better clues as to why CMake Tools is being activated.

So here's the output from freshly opening my Golang project (without a CMakeLists.txt anywhere in sight) that somehow autoactivated the CMake Tools extension:


Startup Performance log

System Info

  • Code: 1.60.2 (7f6ab5485bbc008386c4386d08766667e155244e)
  • OS: win32(10.0.19042)
  • CPUs: Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz(12 x 2208)
  • Memory(System): 15.90 GB(1.79GB free)
  • Memory(Process): 203.32 MB working set(171.52MB private, 1.98MB shared)
  • VM(likelihood): 0%
  • Initial Startup: true
  • Has 0 other windows
  • Screen Reader Active: false
  • Empty Workspace: false

Performance Marks

What Duration Process Info
start => app.isReady 214 [main] initial startup: true
nls:start => nls:end 0 [main] initial startup: true
require(main.bundle.js) 153 [main] initial startup: true
start crash reporter 71 [main] initial startup: true
serve main IPC handle 4 [main] initial startup: true
create window 135 [main] initial startup: true, state: 1ms, widget: 62ms, show: 71ms
app.isReady => window.loadUrl() 425 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 1081 [main->renderer] NewWindow
require(workbench.desktop.main.js) 905 [renderer] cached data: YES, node_modules took 0ms
wait for window config 0 [renderer] -
init storage (global & workspace) 94 [renderer] -
init workspace service 231 [renderer] -
register extensions & spawn extension host 3841 [renderer] -
restore viewlet 32 [renderer] workbench.view.explorer
restore panel 0 [renderer] -
restore & resolve visible editors 1039 [renderer] 1: workbench.editors.files.fileEditorInput
overall workbench load 1539 [renderer] -
workbench ready 4415 [main->renderer] -
renderer ready 2720 [renderer] -
shared process connection ready 1644 [renderer->sharedprocess] -
extensions registered 7426 [renderer] -

Extension Activation Stats

Extension Eager Load Code Call Activate Finish Activate Event By
vscode.debug-auto-launch true 30 0 272 * vscode.debug-auto-launch
vscode.git true 162 12 591 * atlassian.atlascode
arturock.gitstash true 21 157 103 * arturock.gitstash
christian-kohler.path-intellisense true 201 1 101 * christian-kohler.path-intellisense
CoenraadS.disableligatures true 15 1 100 * CoenraadS.disableligatures
cssho.vscode-svgviewer true 351 1 99 * cssho.vscode-svgviewer
ctf0.macros true 13 1 98 * ctf0.macros
davidhewitt.shebang-language-associator true 14 0 98 * davidhewitt.shebang-language-associator
devine-davies.make-hidden true 167 2 96 * devine-davies.make-hidden
disroop.conan true 60 2 173 workspaceContainsTimeout:/conanfile.py,/.vscode/conan-settings.json disroop.conan
donjayamanne.githistory true 63 9 87 * donjayamanne.githistory
EditorConfig.EditorConfig true 181 1 86 * EditorConfig.EditorConfig
Equinusocio.vsc-material-theme true 106 0 3866 * Equinusocio.vsc-material-theme
equinusocio.vsc-material-theme-icons true 99 10 76 * equinusocio.vsc-material-theme-icons
fabiospampinato.vscode-commands true 44 1 76 * fabiospampinato.vscode-commands
GitHub.copilot true 452 7 6377 * GitHub.copilot
gsppvo.vscode-commandbar true 37 1 68 * gsppvo.vscode-commandbar
hediet.tasks-statusbar true 34 1 67 * hediet.tasks-statusbar
lkytal.pomodoro true 44 1 66 * lkytal.pomodoro
mhutchie.git-graph true 221 23 481 * mhutchie.git-graph
minhthai.vscode-todo-parser true 276 0 44 * minhthai.vscode-todo-parser
mrdoomy.reminders true 156 1 43 * mrdoomy.reminders
ms-dotnettools.csharp true 50 13 235 workspaceContainsTimeout:.csproj,.sln,.slnf,.csx,.cake,**/.csproj,/*.sln,/.slnf,**/.csx,**/*.cake ms-dotnettools.csharp
ms-vscode.cmake-tools true 51 0 11090 workspaceContainsTimeout:**/CMakeLists.txt ms-vscode.cmake-tools
ms-vscode.sublime-keybindings true 13 0 43 * ms-vscode.sublime-keybindings
ms-vscode.test-adapter-converter true 40 0 68 * hbenl.vscode-test-explorer
ms-vsliveshare.vsliveshare true 1548 0 16261 * ms-vsliveshare.vsliveshare
nachocab.highlight-dodgy-characters true 14 0 43 * nachocab.highlight-dodgy-characters
oderwat.indent-rainbow true 7 1 42 * oderwat.indent-rainbow
PKief.material-icon-theme true 29 1 142 * PKief.material-icon-theme
redhat.vscode-yaml true 4847 0 191 * atlassian.atlascode
Shan.code-settings-sync true 536 18 23 * Shan.code-settings-sync
shardulm94.trailing-spaces true 117 0 22 * shardulm94.trailing-spaces
softwaredotcom.music-time true 49 6 20 * softwaredotcom.music-time
spikespaz.vscode-smoothtype true 22 1 19 * spikespaz.vscode-smoothtype
spywhere.guides true 762 8 11 * spywhere.guides
vsls-contrib.codetour true 14 5 2647 * vsls-contrib.codetour
WakaTime.vscode-wakatime true 35 0 6 * WakaTime.vscode-wakatime
vscode.configuration-editing false 24 0 8 onLanguage:jsonc vscode.configuration-editing
vscode.docker false -1 -1 -1 onCommand:workbench.action.tasks.runTask ms-azuretools.vscode-docker
vscode.emmet false 17 20 226 onStartupFinished vscode.emmet
vscode.extension-editing false 43 1 3 onLanguage:markdown vscode.extension-editing
vscode.github false 12 1 29 * vscode.github
vscode.github-authentication false 172 10 26 onAuthenticationRequest:github vscode.github-authentication
vscode.grunt false 51 1 25 onCommand:workbench.action.tasks.runTask vscode.grunt
vscode.gulp false 39 4 21 onCommand:workbench.action.tasks.runTask vscode.gulp
vscode.jake false 24 2 18 onCommand:workbench.action.tasks.runTask vscode.jake
vscode.json-language-features false 59 8 0 onLanguage:jsonc vscode.json-language-features
vscode.markdown-language-features false 72 1 2 onLanguage:markdown vscode.markdown-language-features
vscode.markdown-math false 167 0 5 api vscode.markdown-language-features
vscode.merge-conflict false 10 6 220 onStartupFinished vscode.merge-conflict
vscode.microsoft-authentication false 80 15 2984 onAuthenticationRequest:microsoft vscode.microsoft-authentication
ms-vscode-remote.remote-wsl-recommender false 19 27 206 onStartupFinished ms-vscode-remote.remote-wsl-recommender
ms-vscode.js-debug false 203 29 30 onCommand:extension.js-debug.clearAutoAttachVariables ms-vscode.js-debug
vscode.npm false 51 2 14075 onCommand:workbench.action.tasks.runTask vscode.npm
vscode.typescript-language-features false 48 16 2 onCommand:workbench.action.tasks.runTask vscode.typescript-language-features
vscode.yaml false -1 -1 -1 onCommand:workbench.action.tasks.runTask ms-azuretools.vscode-docker
aaron-bond.better-comments false 30 1 338 onLanguage:plaintext aaron-bond.better-comments
alefragnani.Bookmarks false 17 2 364 onStartupFinished alefragnani.Bookmarks
atlassian.atlascode false 266 27 17 * atlassian.atlascode
bierner.markdown-emoji false 19 0 5 api vscode.markdown-language-features
CoenraadS.bracket-pair-colorizer-2 false 125 76 127 onStartupFinished CoenraadS.bracket-pair-colorizer-2
DavidAnson.vscode-markdownlint false 30 2 0 onLanguage:markdown DavidAnson.vscode-markdownlint
eamodio.gitlens false 55 5 1616 onStartupFinished eamodio.gitlens
esbenp.prettier-vscode false 585 43 110 onStartupFinished esbenp.prettier-vscode
golang.go false 1278 62 272 onLanguage:go golang.go
GrapeCity.gc-excelviewer false 14 1 337 onLanguage:plaintext GrapeCity.gc-excelviewer
hbenl.vscode-test-explorer false 109 2 0 * hbenl.vscode-test-explorer
jebbs.plantuml false 1643 5 0 api vscode.markdown-language-features
leodevbro.blockman false 547 14 96 onStartupFinished leodevbro.blockman
mechatroner.rainbow-csv false 19 2 335 onLanguage:plaintext mechatroner.rainbow-csv
ms-azuretools.vscode-docker false 227 9 175 onCommand:workbench.action.tasks.runTask ms-azuretools.vscode-docker
ms-vscode-remote.remote-containers false 70 1 21577 onStartupFinished ms-vscode-remote.remote-containers
ms-vscode-remote.remote-wsl false 14 10 100 onStartupFinished ms-vscode-remote.remote-wsl
rarnoldmobile.todo-txt false 125 1 334 onLanguage:plaintext rarnoldmobile.todo-txt
ryu1kn.partial-diff false 20 1 99 onStartupFinished ryu1kn.partial-diff
softwaredotcom.swdc-vscode false 60 9 191 onStartupFinished softwaredotcom.swdc-vscode
usernamehw.errorlens false 10 16 175 onStartupFinished usernamehw.errorlens

Raw Perf Marks: main

Name	Timestamp	Delta	Total
code/timeOrigin	1632938549634	0	0
code/didStartMain	1632938549828	194	194
code/willStartCrashReporter	1632938549872	44	238
code/didStartCrashReporter	1632938549943	71	309
code/mainAppReady	1632938550042	99	408
code/willLoadMainBundle	1632938550054	12	420
code/fork/willLoadCode	1632938550090	36	456
code/registerFilesystem/file	1632938550202	112	568
code/didLoadMainBundle	1632938550207	5	573
code/willStartMainServer	1632938550234	27	600
code/didStartMainServer	1632938550238	4	604
code/willCreateCodeWindow	1632938550324	86	690
code/willRestoreCodeWindowState	1632938550324	0	690
code/didRestoreCodeWindowState	1632938550325	1	691
code/willCreateCodeBrowserWindow	1632938550325	0	691
code/didCreateCodeBrowserWindow	1632938550387	62	753
code/willMaximizeCodeWindow	1632938550387	0	753
code/didMaximizeCodeWindow	1632938550458	71	824
code/didCreateCodeWindow	1632938550459	1	825
code/willOpenNewWindow	1632938550467	8	833

Raw Perf Marks: renderer

Name	Timestamp	Delta	Total
code/timeOrigin	1632938550470	0	0
code/didStartRenderer	1632938551523	1053	1053
code/willWaitForWindowConfig	1632938551525	2	1055
code/didWaitForWindowConfig	1632938551525	0	1055
code/willShowPartsSplash	1632938551525	0	1055
code/didShowPartsSplash	1632938551528	3	1058
code/willLoadWorkbenchMain	1632938551548	20	1078
code/didLoadWorkbenchMain	1632938552453	905	1983
code/registerFilesystem/file	1632938552455	2	1985
code/registerFilesystem/vscode-userdata	1632938552455	0	1985
code/willInitWorkspaceService	1632938552459	4	1989
code/willInitStorage	1632938552459	0	1989
code/didInitStorage	1632938552553	94	2083
code/didInitWorkspaceService	1632938552690	137	2220
code/willStartWorkbench	1632938552704	14	2234
code/LifecyclePhase/Ready	1632938552709	5	2239
code/registerFilesystem/trustedDomains	1632938552899	190	2429
code/willRestoreEditors	1632938553204	305	2734
code/willRestoreViewlet	1632938553217	13	2747
code/didRestoreViewlet	1632938553249	32	2779
code/willResolveExplorer	1632938553290	41	2820
code/willLoadExtensions	1632938553413	123	2943
code/didResolveExplorer	1632938553542	129	3072
code/didRestoreEditors	1632938554243	701	3773
code/LifecyclePhase/Restored	1632938554243	0	3773
code/didStartWorkbench	1632938554243	0	3773
code/didRemovePartsSplash	1632938554243	0	3773
code/willConnectSharedProcess	1632938554304	61	3834
code/didConnectSharedProcess	1632938555948	1644	5478
code/willHandleExtensionPoints	1632938556000	52	5530
code/didHandleExtensionPoints	1632938557220	1220	6750
code/didLoadExtensions	1632938557254	34	6784

Raw Perf Marks: localExtHost

Name	Timestamp	Delta	Total
code/timeOrigin	1632938553486	0	0
code/fork/start	1632938553671	185	185
code/fork/willLoadCode	1632938553712	41	226
code/extHost/willConnectToRenderer	1632938554969	1257	1483
code/extHost/didConnectToRenderer	1632938554975	6	1489
code/extHost/didWaitForInitData	1632938557573	2598	4087
code/extHost/didCreateServices	1632938557625	52	4139
code/extHost/willWaitForConfig	1632938557668	43	4182
code/extHost/didWaitForConfig	1632938558195	527	4709
code/extHost/didInitAPI	1632938558263	68	4777
code/extHost/didInitProxyResolver	1632938558307	44	4821
code/extHost/ready	1632938558307	0	4821
code/extHost/willLoadExtensionCode/vscode.microsoft-authentication	1632938558723	416	5237
code/extHost/didLoadExtensionCode/vscode.microsoft-authentication	1632938558803	80	5317
code/extHost/willLoadExtensionCode/aaron-bond.better-comments	1632938558807	4	5321
code/extHost/didLoadExtensionCode/aaron-bond.better-comments	1632938558836	29	5350
code/extHost/willLoadExtensionCode/GrapeCity.gc-excelviewer	1632938558837	1	5351
code/extHost/didLoadExtensionCode/GrapeCity.gc-excelviewer	1632938558851	14	5365
code/extHost/willLoadExtensionCode/mechatroner.rainbow-csv	1632938558851	0	5365
code/extHost/didLoadExtensionCode/mechatroner.rainbow-csv	1632938558870	19	5384
code/extHost/willLoadExtensionCode/rarnoldmobile.todo-txt	1632938558871	1	5385
code/extHost/didLoadExtensionCode/rarnoldmobile.todo-txt	1632938558996	125	5510
code/extHost/willLoadExtensionCode/golang.go	1632938558997	1	5511
code/extHost/didLoadExtensionCode/golang.go	1632938560275	1278	6789
code/extHost/willLoadExtensionCode/vscode.debug-auto-launch	1632938560276	1	6790
code/extHost/didLoadExtensionCode/vscode.debug-auto-launch	1632938560306	30	6820
code/extHost/willLoadExtensionCode/vscode.git	1632938560307	1	6821
code/extHost/didLoadExtensionCode/vscode.git	1632938560469	162	6983
code/extHost/willLoadExtensionCode/arturock.gitstash	1632938560469	0	6983
code/extHost/didLoadExtensionCode/arturock.gitstash	1632938560490	21	7004
code/extHost/willLoadExtensionCode/redhat.vscode-yaml	1632938560491	1	7005
code/extHost/didLoadExtensionCode/redhat.vscode-yaml	1632938565338	4847	11852
code/extHost/willLoadExtensionCode/christian-kohler.path-intellisense	1632938565339	1	11853
code/extHost/didLoadExtensionCode/christian-kohler.path-intellisense	1632938565540	201	12054
code/extHost/willLoadExtensionCode/CoenraadS.disableligatures	1632938565541	1	12055
code/extHost/didLoadExtensionCode/CoenraadS.disableligatures	1632938565556	15	12070
code/extHost/willLoadExtensionCode/cssho.vscode-svgviewer	1632938565557	1	12071
code/extHost/didLoadExtensionCode/cssho.vscode-svgviewer	1632938565908	351	12422
code/extHost/willLoadExtensionCode/ctf0.macros	1632938565909	1	12423
code/extHost/didLoadExtensionCode/ctf0.macros	1632938565922	13	12436
code/extHost/willLoadExtensionCode/davidhewitt.shebang-language-associator	1632938565923	1	12437
code/extHost/didLoadExtensionCode/davidhewitt.shebang-language-associator	1632938565937	14	12451
code/extHost/willLoadExtensionCode/devine-davies.make-hidden	1632938565938	1	12452
code/extHost/didLoadExtensionCode/devine-davies.make-hidden	1632938566104	166	12618
code/extHost/willLoadExtensionCode/donjayamanne.githistory	1632938566105	1	12619
code/extHost/didLoadExtensionCode/donjayamanne.githistory	1632938566167	62	12681
code/extHost/willLoadExtensionCode/EditorConfig.EditorConfig	1632938566168	1	12682
code/extHost/didLoadExtensionCode/EditorConfig.EditorConfig	1632938566349	181	12863
code/extHost/willLoadExtensionCode/Equinusocio.vsc-material-theme	1632938566350	1	12864
code/extHost/didLoadExtensionCode/Equinusocio.vsc-material-theme	1632938566456	106	12970
code/extHost/willLoadExtensionCode/equinusocio.vsc-material-theme-icons	1632938566456	0	12970
code/extHost/didLoadExtensionCode/equinusocio.vsc-material-theme-icons	1632938566555	99	13069
code/extHost/willLoadExtensionCode/fabiospampinato.vscode-commands	1632938566555	0	13069
code/extHost/didLoadExtensionCode/fabiospampinato.vscode-commands	1632938566599	44	13113
code/extHost/willLoadExtensionCode/GitHub.copilot	1632938566600	1	13114
code/extHost/didLoadExtensionCode/GitHub.copilot	1632938567052	452	13566
code/extHost/willLoadExtensionCode/gsppvo.vscode-commandbar	1632938567053	1	13567
code/extHost/didLoadExtensionCode/gsppvo.vscode-commandbar	1632938567090	37	13604
code/extHost/willLoadExtensionCode/ms-vscode.test-adapter-converter	1632938567092	2	13606
code/extHost/didLoadExtensionCode/ms-vscode.test-adapter-converter	1632938567131	39	13645
code/extHost/willLoadExtensionCode/hediet.tasks-statusbar	1632938567132	1	13646
code/extHost/didLoadExtensionCode/hediet.tasks-statusbar	1632938567166	34	13680
code/extHost/willLoadExtensionCode/lkytal.pomodoro	1632938567167	1	13681
code/extHost/didLoadExtensionCode/lkytal.pomodoro	1632938567211	44	13725
code/extHost/willLoadExtensionCode/mhutchie.git-graph	1632938567213	2	13727
code/extHost/didLoadExtensionCode/mhutchie.git-graph	1632938567433	220	13947
code/extHost/willLoadExtensionCode/minhthai.vscode-todo-parser	1632938567433	0	13947
code/extHost/didLoadExtensionCode/minhthai.vscode-todo-parser	1632938567709	276	14223
code/extHost/willLoadExtensionCode/mrdoomy.reminders	1632938567710	1	14224
code/extHost/didLoadExtensionCode/mrdoomy.reminders	1632938567866	156	14380
code/extHost/willLoadExtensionCode/ms-vscode.sublime-keybindings	1632938567867	1	14381
code/extHost/didLoadExtensionCode/ms-vscode.sublime-keybindings	1632938567880	13	14394
code/extHost/willLoadExtensionCode/ms-vsliveshare.vsliveshare	1632938567881	1	14395
code/extHost/didLoadExtensionCode/ms-vsliveshare.vsliveshare	1632938569429	1548	15943
code/extHost/willLoadExtensionCode/nachocab.highlight-dodgy-characters	1632938569430	1	15944
code/extHost/didLoadExtensionCode/nachocab.highlight-dodgy-characters	1632938569444	14	15958
code/extHost/willLoadExtensionCode/oderwat.indent-rainbow	1632938569444	0	15958
code/extHost/didLoadExtensionCode/oderwat.indent-rainbow	1632938569451	7	15965
code/extHost/willLoadExtensionCode/PKief.material-icon-theme	1632938569451	0	15965
code/extHost/didLoadExtensionCode/PKief.material-icon-theme	1632938569480	29	15994
code/extHost/willLoadExtensionCode/RobbOwen.synthwave-vscode	1632938569480	0	15994
code/extHost/didLoadExtensionCode/RobbOwen.synthwave-vscode	1632938569514	34	16028
code/extHost/willLoadExtensionCode/Shan.code-settings-sync	1632938569515	1	16029
code/extHost/didLoadExtensionCode/Shan.code-settings-sync	1632938570051	536	16565
code/extHost/willLoadExtensionCode/shardulm94.trailing-spaces	1632938570052	1	16566
code/extHost/didLoadExtensionCode/shardulm94.trailing-spaces	1632938570169	117	16683
code/extHost/willLoadExtensionCode/softwaredotcom.music-time	1632938570169	0	16683
code/extHost/didLoadExtensionCode/softwaredotcom.music-time	1632938570218	49	16732
code/extHost/willLoadExtensionCode/spikespaz.vscode-smoothtype	1632938570219	1	16733
code/extHost/didLoadExtensionCode/spikespaz.vscode-smoothtype	1632938570241	22	16755
code/extHost/willLoadExtensionCode/spywhere.guides	1632938570241	0	16755
code/extHost/didLoadExtensionCode/spywhere.guides	1632938571003	762	17517
code/extHost/willLoadExtensionCode/vsls-contrib.codetour	1632938571003	0	17517
code/extHost/didLoadExtensionCode/vsls-contrib.codetour	1632938571017	14	17531
code/extHost/willLoadExtensionCode/WakaTime.vscode-wakatime	1632938571018	1	17532
code/extHost/didLoadExtensionCode/WakaTime.vscode-wakatime	1632938571053	35	17567

Node Cached Data Stats

cached data used

cached data missed

cached data rejected

cached data created (lazy, might need refreshes)

@bobbrow
Copy link
Member

bobbrow commented Sep 29, 2021

Thanks @darkvertex! This log seems to indicate that there was a timeout searching for CMake files and CMake Tools was activated as a result. I think for your case, the patch we are considering will help. If you follow these instructions and reopen your workspace, that should remove CMake Tools as the cause for unexpected activation. If it still activates after that, please send another Startup Performance log and we'll see if another extension is causing the timeout (which in turn activates all extensions).

@bobbrow bobbrow modified the milestones: 1.9.0, On Deck Oct 15, 2021
@andreeis
Copy link
Contributor

This fix is included in the 1.9.0 CMake Tools release. Please upgrade your extension in VSCode and let us know if you encounter any other issues.

@bl0ggy
Copy link

bl0ggy commented Oct 18, 2021

Even after the update I get a workspaceContainsTimeout:

Startup Performance ## System Info
  • Code: 1.61.1 (c13f1abb110fc756f9b3a6f16670df9cd9d4cf63)
  • OS: win32(10.0.19042)
  • CPUs: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz(8 x 2712)
  • Memory(System): 7.87 GB(0.62GB free)
  • Memory(Process): 195.77 MB working set(159.77MB private, 0.66MB shared)
  • VM(likelihood): 0%
  • Initial Startup: true
  • Has 1 other windows
  • Screen Reader Active: false
  • Empty Workspace: false

Performance Marks

What Duration Process Info
start => app.isReady 167 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 130 [main] initial startup: true
start crash reporter 37 [main] initial startup: true
serve main IPC handle 2 [main] initial startup: true
create window 12 [main] initial startup: true, state: 0ms, widget: 6ms, show: 4ms
app.isReady => window.loadUrl() 414 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 1034 [main->renderer] NewWindow
require(workbench.desktop.main.js) 733 [renderer] cached data: YES, node_modules took 0ms
wait for window config 0 [renderer] -
init storage (global & workspace) 187 [renderer] -
init workspace service 215 [renderer] -
register extensions & spawn extension host 1908 [renderer] -
restore viewlet 47 [renderer] workbench.view.explorer
restore panel 32 [renderer] terminal
restore & resolve visible editors 49962 [renderer] 1: workbench.editors.diffEditorInput
overall workbench load 50259 [renderer] -
workbench ready 52832 [main->renderer] -
renderer ready 51227 [renderer] -
shared process connection ready 1012 [renderer->sharedprocess] -
extensions registered 4997 [renderer] -

Extension Activation Stats

Extension Eager Load Code Call Activate Finish Activate Event By
vscode.debug-auto-launch true 9 1 384 * vscode.debug-auto-launch
vscode.github true 10 2 0 * vscode.github
vscode.npm true 47 1 18679 workspaceContains:package.json vscode.npm
jeff-hykin.code-eol true 20 0 384 * jeff-hykin.code-eol
mrorz.language-gettext true 13 1 383 * mrorz.language-gettext
ms-vscode.atom-keybindings true 12 0 18652 * ms-vscode.atom-keybindings
ms-vscode.cmake-tools true 373 0 19965 workspaceContainsTimeout:/CMakeLists.txt,//CMakeLists.txt,///CMakeLists.txt ms-vscode.cmake-tools
wayou.vscode-todo-highlight true 29 2 381 * wayou.vscode-todo-highlight
vscode.emmet false 90 23 104 onStartupFinished vscode.emmet
vscode.extension-editing false 15 1 3 onLanguage:markdown vscode.extension-editing
vscode.git false 128 71 1198 onFileSystem:git vscode.git
vscode.github-authentication false 17 1 2 onAuthenticationRequest:github vscode.github-authentication
vscode.markdown-language-features false 29 3 0 onLanguage:markdown vscode.markdown-language-features
vscode.markdown-math false 11 0 1 api vscode.markdown-language-features
vscode.merge-conflict false 35 3 101 onStartupFinished vscode.merge-conflict
vscode.microsoft-authentication false 71 2 25288 onAuthenticationRequest:microsoft vscode.microsoft-authentication
ms-vscode-remote.remote-wsl-recommender false 62 12 93 onStartupFinished ms-vscode-remote.remote-wsl-recommender
ms-vscode.js-debug false 283 15 0 onCommand:extension.js-debug.clearAutoAttachVariables ms-vscode.js-debug
vscode.typescript-language-features false 156 165 384 onLanguage:javascript vscode.typescript-language-features
dbaeumer.vscode-eslint false 140 33 60 onStartupFinished dbaeumer.vscode-eslint
eamodio.gitlens false 439 3 1095 onStartupFinished eamodio.gitlens
Gruntfuggly.todo-tree false 117 40 27 onStartupFinished Gruntfuggly.todo-tree
jebbs.plantuml false 954 1 0 api vscode.markdown-language-features
meganrogge.template-string-converter false 20 0 384 onLanguage:javascript meganrogge.template-string-converter
ms-vscode-remote.remote-containers false 385 2 16322 onStartupFinished ms-vscode-remote.remote-containers
ms-vscode-remote.remote-wsl false 83 11 20 onStartupFinished ms-vscode-remote.remote-wsl

Raw Perf Marks: main

Name	Timestamp	Delta	Total
code/timeOrigin	1634542764354	0	0
code/didStartMain	1634542764658	304	304
code/willStartCrashReporter	1634542764685	27	331
code/didStartCrashReporter	1634542764722	37	368
code/mainAppReady	1634542764825	103	471
code/willGenerateNls	1634542764829	4	475
code/didGenerateNls	1634542764830	1	476
code/willLoadMainBundle	1634542764842	12	488
code/fork/willLoadCode	1634542764862	20	508
code/registerFilesystem/file	1634542764963	101	609
code/didLoadMainBundle	1634542764972	9	618
code/willStartMainServer	1634542764981	9	627
code/didStartMainServer	1634542764983	2	629
code/willCreateCodeWindow	1634542765127	144	773
code/willRestoreCodeWindowState	1634542765128	1	774
code/didRestoreCodeWindowState	1634542765128	0	774
code/willCreateCodeBrowserWindow	1634542765128	0	774
code/didCreateCodeBrowserWindow	1634542765161	33	807
code/willMaximizeCodeWindow	1634542765161	0	807
code/didMaximizeCodeWindow	1634542765195	34	841
code/didCreateCodeWindow	1634542765196	1	842
code/willOpenNewWindow	1634542765197	1	843
code/willCreateCodeWindow	1634542765219	22	865
code/willRestoreCodeWindowState	1634542765219	0	865
code/didRestoreCodeWindowState	1634542765219	0	865
code/willCreateCodeBrowserWindow	1634542765220	1	866
code/didCreateCodeBrowserWindow	1634542765226	6	872
code/willMaximizeCodeWindow	1634542765226	0	872
code/didMaximizeCodeWindow	1634542765230	4	876
code/didCreateCodeWindow	1634542765231	1	877
code/willOpenNewWindow	1634542765239	8	885

Raw Perf Marks: localExtHost

Name	Timestamp	Delta	Total
code/timeOrigin	1634542768433	0	0
code/fork/start	1634542768531	98	98
code/fork/willLoadCode	1634542768576	45	143
code/extHost/willConnectToRenderer	1634542769025	449	592
code/extHost/didConnectToRenderer	1634542769028	3	595
code/extHost/didWaitForInitData	1634542769724	696	1291
code/extHost/didCreateServices	1634542769746	22	1313
code/extHost/willWaitForConfig	1634542769761	15	1328
code/extHost/didWaitForConfig	1634542770142	381	1709
code/extHost/didInitAPI	1634542770142	0	1709
code/extHost/didInitProxyResolver	1634542770152	10	1719
code/extHost/ready	1634542770152	0	1719
code/extHost/willLoadExtensionCode/vscode.microsoft-authentication	1634542770451	299	2018
code/extHost/didLoadExtensionCode/vscode.microsoft-authentication	1634542770522	71	2089
code/extHost/willLoadExtensionCode/vscode.git	1634542770532	10	2099
code/extHost/didLoadExtensionCode/vscode.git	1634542770660	128	2227
code/extHost/willLoadExtensionCode/vscode.typescript-language-features	1634542770660	0	2227
code/extHost/didLoadExtensionCode/vscode.typescript-language-features	1634542770816	156	2383
code/extHost/willLoadExtensionCode/meganrogge.template-string-converter	1634542770816	0	2383
code/extHost/didLoadExtensionCode/meganrogge.template-string-converter	1634542770836	20	2403
code/extHost/willLoadExtensionCode/vscode.debug-auto-launch	1634542770836	0	2403
code/extHost/didLoadExtensionCode/vscode.debug-auto-launch	1634542770845	9	2412
code/extHost/willLoadExtensionCode/jeff-hykin.code-eol	1634542770845	0	2412
code/extHost/didLoadExtensionCode/jeff-hykin.code-eol	1634542770865	20	2432
code/extHost/willLoadExtensionCode/mrorz.language-gettext	1634542770865	0	2432
code/extHost/didLoadExtensionCode/mrorz.language-gettext	1634542770878	13	2445
code/extHost/willLoadExtensionCode/ms-vscode.atom-keybindings	1634542770878	0	2445
code/extHost/didLoadExtensionCode/ms-vscode.atom-keybindings	1634542770890	12	2457
code/extHost/willLoadExtensionCode/wayou.vscode-todo-highlight	1634542770891	1	2458
code/extHost/didLoadExtensionCode/wayou.vscode-todo-highlight	1634542770920	29	2487
code/extHost/willLoadExtensionCode/vscode.npm	1634542770920	0	2487
code/extHost/didLoadExtensionCode/vscode.npm	1634542770967	47	2534
code/extHost/willActivateExtension/vscode.microsoft-authentication	1634542771294	327	2861
code/extHost/willActivateExtension/vscode.git	1634542771296	2	2863
code/extHost/willActivateExtension/vscode.typescript-language-features	1634542771367	71	2934
code/extHost/willActivateExtension/meganrogge.template-string-converter	1634542771532	165	3099
code/extHost/willActivateExtension/vscode.debug-auto-launch	1634542771532	0	3099
code/extHost/willActivateExtension/jeff-hykin.code-eol	1634542771533	1	3100
code/extHost/willActivateExtension/mrorz.language-gettext	1634542771533	0	3100
code/extHost/willActivateExtension/ms-vscode.atom-keybindings	1634542771534	1	3101
code/extHost/willActivateExtension/wayou.vscode-todo-highlight	1634542771534	0	3101
code/extHost/willActivateExtension/vscode.npm	1634542771536	2	3103
code/extHost/didActivateExtension/vscode.typescript-language-features	1634542772216	680	3783
code/extHost/didActivateExtension/meganrogge.template-string-converter	1634542772217	1	3784
code/extHost/didActivateExtension/vscode.debug-auto-launch	1634542772217	0	3784
code/extHost/didActivateExtension/jeff-hykin.code-eol	1634542772217	0	3784
code/extHost/didActivateExtension/mrorz.language-gettext	1634542772217	0	3784
code/extHost/didActivateExtension/wayou.vscode-todo-highlight	1634542772217	0	3784
code/extHost/didActivateExtension/vscode.git	1634542772565	348	4132

Raw Perf Marks: renderer

Name	Timestamp	Delta	Total
code/timeOrigin	1634542765241	0	0
code/didStartRenderer	1634542766263	1022	1022
code/willWaitForWindowConfig	1634542766264	1	1023
code/didWaitForWindowConfig	1634542766264	0	1023
code/willShowPartsSplash	1634542766264	0	1023
code/didShowPartsSplash	1634542766266	2	1025
code/willLoadWorkbenchMain	1634542766273	7	1032
code/didLoadWorkbenchMain	1634542767006	733	1765
code/registerFilesystem/file	1634542767009	3	1768
code/registerFilesystem/vscode-userdata	1634542767009	0	1768
code/willInitWorkspaceService	1634542767012	3	1771
code/willInitStorage	1634542767013	1	1772
code/didInitStorage	1634542767200	187	1959
code/didInitWorkspaceService	1634542767227	27	1986
code/willStartWorkbench	1634542767231	4	1990
code/LifecyclePhase/Ready	1634542767286	55	2045
code/registerFilesystem/trustedDomains	1634542767315	29	2074
code/willRestoreEditors	1634542767528	213	2287
code/willRestoreViewlet	1634542767533	5	2292
code/willRestorePanel	1634542767548	15	2307
code/didRestoreViewlet	1634542767580	32	2339
code/didRestorePanel	1634542767580	0	2339
code/willResolveExplorer	1634542767613	33	2372
code/willLoadExtensions	1634542767747	134	2506
code/didResolveExplorer	1634542768791	1044	3550
code/willHandleExtensionPoints	1634542769147	356	3906
code/didHandleExtensionPoints	1634542769638	491	4397
code/didLoadExtensions	1634542769655	17	4414
code/willConnectSharedProcess	1634542769775	120	4534
code/LifecyclePhase/Restored	1634542769857	82	4616
code/didRemovePartsSplash	1634542769857	0	4616
code/didConnectSharedProcess	1634542770787	930	5546
code/registerFilesystem/git	1634542787966	17179	22725
code/registerFilesystem/gitlens	1634542801474	13508	36233
code/didRestoreEditors	1634542817490	16016	52249
code/didStartWorkbench	1634542817490	0	52249

Node Cached Data Stats

cached data used

cached data missed

cached data rejected

cached data created (lazy, might need refreshes)

In my workspace I have about 10 folders, each containing node_modules and/or .git folders (which contain lots of subfolders), both node_modules and .git make timeout.

I suggest you to exclude these kind of folders with the glob pattern (.git, node_modules, .svn, etc...).
In my vscode settings I already have this:

# Files: Exculde (default)
**/.git
**/.svn
**/.hg
**/CVS
**/.DS_Store
**/Thumbs.db

# Files: Watcher Exclude (default)
**/.git/objects/**
**/.git/subtree-cache/**
**/node_modules/*/**
**/.hg/store/**

# Search: Exclude (default)
**/node_modules
**/bower_components
**/*.code-search

But it doesn't seem to have any effect.

@bobbrow
Copy link
Member

bobbrow commented Oct 18, 2021

As far as I can tell, vscode is honoring those exclusions for extension activation purposes. I added CMakeLists.txt to .git and node_modules in a TypeScript project of mine and CMake Tools does not activate. If you open %userprofile%/.vscode/extensions/ms-vscode.cmake-tools-1.9.0/package.json and remove the workspaceContains entries one at a time starting with the deepest search */*/*/CMakeLists.txt, at what point does vscode stop timing out on activation for you?

@bl0ggy
Copy link

bl0ggy commented Oct 22, 2021

A week ago I tried to remove those lines in %userprofile%/.vscode/extensions/ms-vscode.cmake-tools-1.9.0/package.json but after reopening vscode the extension wasn't working anymore. vscode told me that an extension has been modified so I had to click "Reopen", but it didn't work anyway. I usually keep my computer on at night but I turned it off recently, since then I don't have the timeout anymore. I don't know if Windows was keeping a cache somewhere, but the issue seems to be fixed on my side too.
Thank you.

@jeffbi
Copy link
Author

jeffbi commented Oct 22, 2021

A few minutes ago I opened a LaTeX-only directory and got the prompt to configure it. I closed the VS Code window and opened the directory again and there was no prompt.

I opened a different LaTeX-only directory that is a sub-directory of a directory that does have a CMakeLists.txt file and while I didn't get the "do you want to configure" prompt, I did get prompted to select a kit. Does the extension go up directory levels even if it's on a directory that has no CMakeLists.txt file?

@bobbrow
Copy link
Member

bobbrow commented Oct 22, 2021

It should only activate on the presence of files at the ${workspaceFolder} level and down. The way to know how you were activated is to run the Developer: Startup Performance command and see what the trigger was. If you want to share that output here, I can help you find it.

@jeffbi
Copy link
Author

jeffbi commented Oct 22, 2021

OK, I again opened the LaTeX-only directory which is a sub-directory of a CMake directory. I got both the "do you want to configure" prompt and the "didn't find CMakeLists.txt" message.

Here is the output from Developer: Startup Performance:

## System Info

* Code: 1.61.2 (6cba118ac49a1b88332f312a8f67186f7f3c1643)
* OS: linux(5.4.0-88-generic)
* CPUs: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz(1 x 3392)
* Memory(System): 3.84 GB(0.24GB free)
* Memory(Process): 233.66 MB working set(124.75MB private, 13.42MB shared)
* VM(likelihood): 100%
* Initial Startup: false
* Has 1 other windows
* Screen Reader Active: false
* Empty Workspace: false

## Performance Marks

| What                                                            | Duration | Process                   | Info                                       |
| --------------------------------------------------------------- | -------- | ------------------------- | ------------------------------------------ |
| start => app.isReady                                            | -        | [main]                    | initial startup: false                     |
| nls:start => nls:end                                            | -        | [main]                    | initial startup: false                     |
| require(main.bundle.js)                                         | -        | [main]                    | initial startup: false                     |
| start crash reporter                                            | -        | [main]                    | initial startup: false                     |
| serve main IPC handle                                           | -        | [main]                    | initial startup: false                     |
| create window                                                   | -        | [main]                    | initial startup: false,                    |
| app.isReady => window.loadUrl()                                 | -        | [main]                    | initial startup: false                     |
| window.loadUrl() => begin to require(workbench.desktop.main.js) | 806      | [main->renderer]          | NewWindow                                  |
| require(workbench.desktop.main.js)                              | 1059     | [renderer]                | cached data: YES, node_modules took 0ms    |
| wait for window config                                          | 0        | [renderer]                | -                                          |
| init storage (global & workspace)                               | 57       | [renderer]                | -                                          |
| init workspace service                                          | 112      | [renderer]                | -                                          |
| register extensions & spawn extension host                      | 2908     | [renderer]                | -                                          |
| restore viewlet                                                 | 115      | [renderer]                | workbench.view.explorer                    |
| restore panel                                                   | 86       | [renderer]                | workbench.panel.output                     |
| restore & resolve visible editors                               | 1505     | [renderer]                | 1: workbench.editors.files.fileEditorInput |
| overall workbench load                                          | 2152     | [renderer]                | -                                          |
| workbench ready                                                 | 4145     | [main->renderer]          | -                                          |
| renderer ready                                                  | 3366     | [renderer]                | -                                          |
| shared process connection ready                                 | 0        | [renderer->sharedprocess] | -                                          |
| extensions registered                                           | 5911     | [renderer]                | -                                          |

## Extension Activation Stats

| Extension                         | Eager | Load Code | Call Activate | Finish Activate | Event                                                                             | By                                |
| --------------------------------- | ----- | --------- | ------------- | --------------- | --------------------------------------------------------------------------------- | --------------------------------- |
| vscode.debug-auto-launch          | true  | 65        | 0             | 130             | *                                                                                 | vscode.debug-auto-launch          |
| vscode.git                        | true  | 224       | 55            | 1272            | *                                                                                 | vscode.github                     |
| EditorConfig.EditorConfig         | true  | 255       | 1             | 74              | *                                                                                 | EditorConfig.EditorConfig         |
| ms-vscode.cmake-tools             | true  | 312       | 0             | 4033            | workspaceContainsTimeout:*/CMakeLists.txt,*/*/CMakeLists.txt,*/*/*/CMakeLists.txt | ms-vscode.cmake-tools             |
| slevesque.vscode-hexdump          | true  | 274       | 2             | 72              | *                                                                                 | slevesque.vscode-hexdump          |
| vscode-icons-team.vscode-icons    | true  | 109       | 50            | 10927           | *                                                                                 | vscode-icons-team.vscode-icons    |
| vscode.emmet                      | false | 85        | 48            | 159             | onStartupFinished                                                                 | vscode.emmet                      |
| vscode.extension-editing          | false | 118       | 1             | 11              | onLanguage:markdown                                                               | vscode.extension-editing          |
| vscode.github                     | false | 36        | 17            | 0               | *                                                                                 | vscode.github                     |
| vscode.github-authentication      | false | 49        | 1             | 0               | onAuthenticationRequest:github                                                    | vscode.github-authentication      |
| vscode.markdown-language-features | false | 470       | 11            | 0               | onLanguage:markdown                                                               | vscode.markdown-language-features |
| vscode.markdown-math              | false | 66        | 0             | 0               | api                                                                               | vscode.markdown-language-features |
| vscode.merge-conflict             | false | 56        | 8             | 151             | onStartupFinished                                                                 | vscode.merge-conflict             |
| vscode.microsoft-authentication   | false | 79        | 4             | 9454            | onAuthenticationRequest:microsoft                                                 | vscode.microsoft-authentication   |
| ms-vscode.js-debug                | false | 1151      | 134           | 17              | onCommand:extension.js-debug.clearAutoAttachVariables                             | ms-vscode.js-debug                |
| James-Yu.latex-workshop           | false | 1293      | 946           | 130             | onLanguage:latex                                                                  | James-Yu.latex-workshop           |
| ms-vscode.cpptools                | false | 143       | 1             | 25              | api                                                                               | ms-vscode.cmake-tools             |

## Raw Perf Marks: main

Name Timestamp Delta Total
code/timeOrigin 1634709553913 0 0
code/didStartMain 1634709554905 992 992
code/willStartCrashReporter 1634709555020 115 1107
code/didStartCrashReporter 1634709555050 30 1137
code/mainAppReady 1634709555991 941 2078
code/willLoadMainBundle 1634709556071 80 2158
code/fork/willLoadCode 1634709556113 42 2200
code/registerFilesystem/file 1634709556355 242 2442
code/didLoadMainBundle 1634709556360 5 2447
code/willStartMainServer 1634709556413 53 2500
code/didStartMainServer 1634709556417 4 2504
code/willCreateCodeWindow 1634709557363 946 3450
code/willRestoreCodeWindowState 1634709557364 1 3451
code/didRestoreCodeWindowState 1634709557365 1 3452
code/willCreateCodeBrowserWindow 1634709557365 0 3452
code/didCreateCodeBrowserWindow 1634709558447 1082 4534
code/didCreateCodeWindow 1634709558455 8 4542
code/willOpenNewWindow 1634709558524 69 4611
code/willCreateCodeWindow 1634709609920 51396 56007
code/willRestoreCodeWindowState 1634709609920 0 56007
code/didRestoreCodeWindowState 1634709609920 0 56007
code/willCreateCodeBrowserWindow 1634709609921 1 56008
code/didCreateCodeBrowserWindow 1634709610160 239 56247
code/didCreateCodeWindow 1634709610160 0 56247
code/willOpenNewWindow 1634709610177 17 56264
code/willOpenNewWindow 1634710635763 1025586 1081850
code/willCreateCodeWindow 1634930376183 219740420 220822270
code/willRestoreCodeWindowState 1634930376186 3 220822273
code/didRestoreCodeWindowState 1634930376186 0 220822273
code/willCreateCodeBrowserWindow 1634930376194 8 220822281
code/didCreateCodeBrowserWindow 1634930379000 2806 220825087
code/didCreateCodeWindow 1634930379022 22 220825109
code/willOpenNewWindow 1634930379143 121 220825230
code/willCreateCodeWindow 1634930519205 140062 220965292
code/willRestoreCodeWindowState 1634930519205 0 220965292
code/didRestoreCodeWindowState 1634930519205 0 220965292
code/willCreateCodeBrowserWindow 1634930519205 0 220965292
code/didCreateCodeBrowserWindow 1634930519564 359 220965651
code/didCreateCodeWindow 1634930519564 0 220965651
code/willOpenNewWindow 1634930519565 1 220965652
code/willCreateCodeWindow 1634930642408 122843 221088495
code/willRestoreCodeWindowState 1634930642408 0 221088495
code/didRestoreCodeWindowState 1634930642408 0 221088495
code/willCreateCodeBrowserWindow 1634930642409 1 221088496
code/didCreateCodeBrowserWindow 1634930642919 510 221089006
code/didCreateCodeWindow 1634930642919 0 221089006
code/willOpenNewWindow 1634930642976 57 221089063
code/willOpenNewWindow 1634930785626 142650 221231713
code/willCreateCodeWindow 1634933441482 2655856 223887569
code/willRestoreCodeWindowState 1634933441482 0 223887569
code/didRestoreCodeWindowState 1634933441482 0 223887569
code/willCreateCodeBrowserWindow 1634933441483 1 223887570
code/didCreateCodeBrowserWindow 1634933442095 612 223888182
code/didCreateCodeWindow 1634933442095 0 223888182
code/willOpenNewWindow 1634933442096 1 223888183

## Raw Perf Marks: renderer

Name Timestamp Delta Total
code/timeOrigin 1634933442097 0 0
code/didStartRenderer 1634933442875 778 778
code/willWaitForWindowConfig 1634933442876 1 779
code/didWaitForWindowConfig 1634933442876 0 779
code/willShowPartsSplash 1634933442876 0 779
code/didShowPartsSplash 1634933442881 5 784
code/willLoadWorkbenchMain 1634933442902 21 805
code/didLoadWorkbenchMain 1634933443961 1059 1864
code/registerFilesystem/file 1634933443964 3 1867
code/registerFilesystem/vscode-userdata 1634933443965 1 1868
code/willInitWorkspaceService 1634933443970 5 1873
code/willInitStorage 1634933443970 0 1873
code/didInitStorage 1634933444027 57 1930
code/didInitWorkspaceService 1634933444082 55 1985
code/willStartWorkbench 1634933444089 7 1992
code/LifecyclePhase/Ready 1634933444289 200 2192
code/registerFilesystem/trustedDomains 1634933444358 69 2261
code/willRestoreEditors 1634933444736 378 2639
code/willRestoreViewlet 1634933444746 10 2649
code/willRestorePanel 1634933444775 29 2678
code/didRestoreViewlet 1634933444861 86 2764
code/didRestorePanel 1634933444861 0 2764
code/willResolveExplorer 1634933444900 39 2803
code/willLoadExtensions 1634933445099 199 3002
code/didResolveExplorer 1634933445515 416 3418
code/didRestoreEditors 1634933446241 726 4144
code/LifecyclePhase/Restored 1634933446241 0 4144
code/didStartWorkbench 1634933446241 0 4144
code/didRemovePartsSplash 1634933446241 0 4144
code/willConnectSharedProcess 1634933446361 120 4264
code/willHandleExtensionPoints 1634933446694 333 4597
code/didHandleExtensionPoints 1634933447992 1298 5895
code/didLoadExtensions 1634933448007 15 5910

## Raw Perf Marks: localExtHost

Name Timestamp Delta Total
code/timeOrigin 1634933445280 0 0
code/fork/start 1634933445621 341 341
code/fork/willLoadCode 1634933445760 139 480
code/extHost/willConnectToRenderer 1634933446841 1081 1561
code/extHost/didConnectToRenderer 1634933446844 3 1564
code/extHost/didWaitForInitData 1634933448746 1902 3466
code/extHost/didCreateServices 1634933448794 48 3514
code/extHost/willWaitForConfig 1634933448837 43 3557
code/extHost/didWaitForConfig 1634933449873 1036 4593
code/extHost/didInitAPI 1634933449873 0 4593
code/extHost/didInitProxyResolver 1634933449968 95 4688
code/extHost/ready 1634933450002 34 4722
code/extHost/willLoadExtensionCode/vscode.microsoft-authentication 1634933450929 927 5649
code/extHost/didLoadExtensionCode/vscode.microsoft-authentication 1634933451008 79 5728
code/extHost/willLoadExtensionCode/James-Yu.latex-workshop 1634933451008 0 5728
code/extHost/didLoadExtensionCode/James-Yu.latex-workshop 1634933452301 1293 7021
code/extHost/willLoadExtensionCode/vscode.debug-auto-launch 1634933452301 0 7021
code/extHost/didLoadExtensionCode/vscode.debug-auto-launch 1634933452366 65 7086
code/extHost/willLoadExtensionCode/vscode.git 1634933452367 1 7087
code/extHost/didLoadExtensionCode/vscode.git 1634933452591 224 7311
code/extHost/willLoadExtensionCode/EditorConfig.EditorConfig 1634933452591 0 7311
code/extHost/didLoadExtensionCode/EditorConfig.EditorConfig 1634933452846 255 7566
code/extHost/willLoadExtensionCode/slevesque.vscode-hexdump 1634933452846 0 7566
code/extHost/didLoadExtensionCode/slevesque.vscode-hexdump 1634933453120 274 7840
code/extHost/willLoadExtensionCode/vscode-icons-team.vscode-icons 1634933453121 1 7841
code/extHost/didLoadExtensionCode/vscode-icons-team.vscode-icons 1634933453230 109 7950
code/extHost/willActivateExtension/vscode.microsoft-authentication 1634933453387 157 8107
code/extHost/willActivateExtension/James-Yu.latex-workshop 1634933453391 4 8111
code/extHost/willActivateExtension/vscode.debug-auto-launch 1634933454337 946 9057
code/extHost/willActivateExtension/vscode.git 1634933454337 0 9057
code/extHost/willActivateExtension/EditorConfig.EditorConfig 1634933454392 55 9112
code/extHost/willActivateExtension/slevesque.vscode-hexdump 1634933454393 1 9113
code/extHost/willActivateExtension/vscode-icons-team.vscode-icons 1634933454395 2 9115
code/extHost/didActivateExtension/James-Yu.latex-workshop 1634933454469 74 9189
code/extHost/didActivateExtension/vscode.debug-auto-launch 1634933454469 0 9189
code/extHost/didActivateExtension/EditorConfig.EditorConfig 1634933454469 0 9189
code/extHost/didActivateExtension/slevesque.vscode-hexdump 1634933454469 0 9189
code/extHost/didActivateExtension/vscode.git 1634933455664 1195 10384
code/extHost/willLoadExtensionCode/ms-vscode.cmake-tools 1634933459813 4149 14533
code/extHost/didLoadExtensionCode/ms-vscode.cmake-tools 1634933460125 312 14845


## Node Cached Data Stats


### cached data used


### cached data missed


### cached data rejected


### cached data created (lazy, might need refreshes)


@bobbrow
Copy link
Member

bobbrow commented Oct 22, 2021

It activates because of a timeout checking the top 3 subfolders:
| ms-vscode.cmake-tools | true | 312 | 0 | 4033 | workspaceContainsTimeout:*/CMakeLists.txt,*/*/CMakeLists.txt,*/*/*/CMakeLists.txt | ms-vscode.cmake-tools |

The only other thing that stands out in this log is:
* VM(likelihood): 100%

I'm not sure how fast your VM is, but if it's slower to enumerate files than your local PC, that could contribute to the timeout.

@jeffbi
Copy link
Author

jeffbi commented Oct 22, 2021

Interesting. The folder in question has no sub-folders at all. There are parent folders with CMakeList.txt files.

@bobbrow
Copy link
Member

bobbrow commented Oct 22, 2021

How many files are in the folder? How long does it take to do an ls in the VS Code terminal?

@jeffbi
Copy link
Author

jeffbi commented Oct 22, 2021

There are eight files in the folder. Running ls from the VS Code terminal is pretty close to instantaneous response.

@bobbrow
Copy link
Member

bobbrow commented Oct 22, 2021

Ok. This is really strange then. Is there a way to get a repro into the hands of the VS Code developers? Unfortunately our extension doesn't have any play in this code and I don't think it's a good idea for us to scope the CMakeList.txt search any smaller (in your case we'd have to remove it entirely) so I think the best course of action is to open an issue with the VS Code team. You can also disable the extension for specific workspaces by clicking on the gear icon in the Extensions panel.
image

@jeffbi
Copy link
Author

jeffbi commented Oct 22, 2021

OK, I'll open an issue with the VS Code team, and likely disable the extension for this workspace. Thanks for looking into this.

@bobbrow
Copy link
Member

bobbrow commented Nov 19, 2021

The VS Code team just made a change to stop activating extensions when the search for CMakeLists.txt times out.

microsoft/vscode#135673 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: activation related to extension activation
Projects
None yet
Development

No branches or pull requests

6 participants