Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.46k stars 142 forks source link

[Bug] C# Extension causes VSCode to lag #689

Open cmidkiff87 opened 2 years ago

cmidkiff87 commented 2 years ago

Edit: see comments below


I have a 30MB 7zip file in the root of my project folder. Whenever I enable todo-tree, the editor slows down hard. I can mitigate this by adding "**/*.7z" to the todo-tree.filtering.excludeGlobs.

I do have this file in my gitignore, but it seems that todo-tree doesn't detect this.


I feel that todo-tree should both

Related issues:

Settings ```json { "todo-tree.general.tags": [ "BUG", "HACK", "FIXME", "NOTE", "REFACTOR", "TODO", ], "todo-tree.highlights.defaultHighlight": { "background": "#303030", "opacity": 0 }, "todo-tree.highlights.enabled": true, "todo-tree.highlights.customHighlight": { "BUG": { "icon": "bug", "foreground": "#f87b15", }, "HACK": { "icon": "tools", "foreground": "#F00000", }, "FIXME": { "icon": "flame", "foreground": "#F00000", }, "NOTE": { "icon": "alert", "foreground": "#FFFF00", }, "REFACTOR": { "icon": "rocket", "foreground": "#48D1CC" }, "TODO": { "icon": "check-circle", "foreground": "#FFC0CB", }, }, "todo-tree.filtering.excludeGlobs": [ "**/node_modules", "**/bin", "**/obj", "**/.vscode", "**/__*", "**/*.7z", // Toggle this ], } ```
VSCode build info ``` Version: 1.72.2 (user setup) Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022-10-12T22:15:18.074Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No ```
cmidkiff87 commented 2 years ago

Wait, it's still happening, and i've moved the files out of the folder. hmmm

Edit: After playing with it some, I now believe it is due to some conflicting extensions. I need to investigate further.

cmidkiff87 commented 2 years ago

Ok, after peforming an Extension Bisect, i've identified C# as the issue. It only happens when both C# and todo-tree are enabled.

perhaps something to do with intellisense?

VSCode extensions ``` adammaras.overtype adpyke.vscode-sql-formatter alphabotsec.vscode-eclipse-keybindings Azurite.azurite bungcip.better-toml burkeholland.simple-react-snippets dakara.transformer dbaeumer.vscode-eslint DotJoshJohnson.xml eamodio.gitlens fabiospampinato.vscode-highlight geddski.macros Gruntfuggly.todo-tree hashicorp.terraform HTMLHint.vscode-htmlhint IBM.output-colorizer jongrant.csharpsortusings matt-meyers.vscode-dbml mechatroner.rainbow-csv mhutchie.git-graph ms-dotnettools.csharp ms-dotnettools.vscode-dotnet-runtime ms-mssql.data-workspace-vscode ms-mssql.mssql ms-mssql.sql-bindings-vscode ms-mssql.sql-database-projects-vscode ms-python.python ms-python.vscode-pylance ms-vscode.azure-account ms-vscode.cmake-tools ms-vscode.cpptools ms-vscode.hexeditor ms-vscode.live-server Reptarsrage.vscode-manage-user-secrets Shan.code-settings-sync streetsidesoftware.code-spell-checker TheNuProjectContributors.vscode-nushell-lang twxs.cmake vadimcn.vscode-lldb Vallentin.vscode-bnf VisualStudioExptTeam.intellicode-api-usage-examples VisualStudioExptTeam.vscodeintellicode yo1dog.cursor-align yzhang.markdown-all-in-one ```
Elias-Graf commented 2 years ago

Have you tried disabling all extensions and only enabling c# and todo-tree?

I've never experienced any issue with those two.

Can you create a reproduction repository?

cmidkiff87 commented 2 years ago

Ok, after some fiddling, I've narrowed it down to 3 extensions.

C#, todo-tree, and Overtype

Enabling all 3 on a bare C# repo causes it. Albeit, the lag seems to get worse the more files you have

I don't have overtype mode enabled, and disabling any one of the three "fixes" the lag. (in testing, i made sure to wait for omnisharp to finish loading)

Repro repo

Full VSCode settings json ```json { //#region VSCode settings "debug.onTaskErrors": "abort", "editor.accessibilitySupport": "off", "editor.fontSize": 18, "editor.minimap.enabled": false, "editor.renderControlCharacters": true, "editor.renderWhitespace": "all", "editor.suggestSelection": "first", "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?_", "editor.wrappingIndent": "indent", "explorer.confirmDelete": false, "explorer.confirmDragAndDrop": false, "extensions.autoUpdate": true, "extensions.ignoreRecommendations": true, "files.associations": { ".bash_aliases*": "shellscript" }, "files.eol": "\n", "hexeditor.columnWidth": 5, "hexeditor.defaultEndianness": "little", "hexeditor.inspectorType": "aside", "hexeditor.showDecodedText": true, "markdown.extension.orderedList.marker": "one", "search.searchOnType": true, "terminal.integrated.defaultProfile.windows": "Git Bash", "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue", "window.customMenuBarAltFocus": false, "workbench.statusBar.visible": true, "workbench.tree.indent": 20, "workbench.tree.renderIndentGuides": "always", //#endregion //#region macros "macros": { "endComma": [ "cursorLineEnd", {"command": "type", "args": {"text": ","}}, ], "endSemi": [ "cursorLineEnd", {"command": "type", "args": {"text": ";"}}, ], "endCurly": [ "cursorLineEnd", {"command": "type", "args": {"text": "{"}}, ], "endDefault": [ "cursorLineEnd", {"command": "editor.action.insertSnippet", "args": {"name": "Default"}}, ], }, //#endregion //#region todo comment customizations "todo-tree.general.tags": [ "BUG", "HACK", "FIXME", "NOTE", "REFACTOR", "TODO", ], "todo-tree.highlights.defaultHighlight": { "background": "#303030", "opacity": 0 }, "todo-tree.highlights.enabled": true, "todo-tree.highlights.customHighlight": { "BUG": { "icon": "bug", "foreground": "#f87b15", }, "HACK": { "icon": "tools", "foreground": "#F00000", }, "FIXME": { "icon": "flame", "foreground": "#F00000", }, "NOTE": { "icon": "alert", "foreground": "#FFFF00", }, "REFACTOR": { "icon": "rocket", "foreground": "#48D1CC" }, "TODO": { "icon": "check-circle", "foreground": "#FFC0CB", }, }, "todo-tree.filtering.excludeGlobs": [ "**/node_modules", "**/bin", "**/obj", "**/__pycache__", "**/.vscode", "**/__*", "**/*.7z", ], "highlight.regexes": { // "(//|