Hello everyone. My problem is as described in the title. I installed the 1.21.6 version of Microsoft’s C/C++ extension from VS Code through import. However, I found that using it causes Cursor to consume a significant amount of CPU resources.
I’ve been using Cursor version 0.48.4. But yesterday, I was forced to upgrade to the latest version; otherwise, I couldn’t use the agent. After I upgraded to the latest version of Cursor (1.4.2) and imported the VS Code extension, the CPU usage soared, as shown in the following figure. Later, I found that the CPU usage returned to normal after uninstalling Microsoft’s C/C++ extension.
Therefore, I uninstalled Microsoft’s C/C++ extension and installed the C/C++ plugin from Anysphere. However, when using it, I found that many definitions cannot be automatically jumped to, or the jumps are incorrect. Moreover, functions, variables, etc., are not automatically distinguished as they are with Microsoft’s plugin.
So now I’d like to ask how to solve the problem of high CPU usage caused by Microsoft’s C/C++ extension, or how to make the C/C++ plugin from Anysphere perform correct automatic jumps.
I’ve found the cause. It’s because Microsoft’s C/C++ extension reopens and scans a lot of files every time I open or view a C/C++ file. I have no idea why this is happening. It worked fine in Cursor version 0.48.4 and in VS Code. Now I’ve uninstalled it.
The C/C++ extension from Anysphere uses Clangd. Maybe I didn’t configure it correctly. Now I’ve re - configured Clangd and it’s currently indexing. I’ll see if it runs properly after the indexing is done. To be honest, this is the first time I’ve used Clangd, and I feel it’s far less user - friendly than Microsoft’s C/C++ extension. It also relies on the compile_commands.json file. But I don’t think it’s easy to generate this file for every project.
I really want to complain about the new version of Cursor. After being forced to upgrade to the latest version, I used Clangd to solve the high CPU usage caused by Microsoft’s C/C++ extension. However, during normal use, the CPU usage becomes extremely high whether the agent is running or when searching for code. Occasionally, I also encounter high CPU usage when just looking at the code, and I have no idea why. I really miss the smooth experience of the old version of Cursor.