platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.22k stars 195 forks source link

VScode gets extremely slow when opening multiple files via links from 'inspect' tab #3763

Open TD-er opened 1 year ago

TD-er commented 1 year ago

I sometimes use the PIO inspect feature to either get some idea of memory usage per object/class or run PVS Studio. From these I try to open a file from such a link, which includes a line-number and position on that line. So I guess this might also occur when you click on such a link from the compiler output.

On every new file I open like this, the IDE gets slower and slower, CPU fan starts blowing and RAM usage increases. Sometimes even > 30 GB of RAM is being used by all VS code child processes.

Here some snapshot of the Task Manager with only 3 tabs open in VS code: image

What makes this slowdown even more annoying is that it keeps resetting the open tab and cursor to the point mentioned in the link when opening. Thus editing that line becomes next to impossible as it keeps resetting the active tab and cursor position. Moving a file to a new pane in VScode is also next to impossible as the focus keeps changing and saving the file may take forever.

I have these VS code extensions installed: image

PIO version: Core 6.1.9 Home 3.4.4

VS code version: Version: 1.79.2 (system setup) Commit: 695af097c7bd098fbf017ce3ac85e09bbc5dda06 Date: 2023-06-14T08:57:04.379Z Electron: 22.5.7 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Windows_NT x64 10.0.22621

I do now see there is apparently a new version of VS-code, but this issue has been there for a while so it is for sure not introduced in the latest PIO or VS code update.

TD-er commented 1 year ago

Update: It looks like the last file opened via such a link gets opened again and again. Whenever I try to close a tab with the last opened file, it gets re-opened again. I also see about one C/C++ IntelliSense Server instance in the taskmanager per opened tab in VS Code.

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. Please provide more details or it will be closed if no further activity occurs. Thank you for your contributions.