Open Mingun opened 2 years ago
Can you post your todo-tree settings?
In particular, is todo-tree.general.enableFileWatcher
enabled?
I use default settings and todo-tree.general.enableFileWatcher
is not enabled
Can you enabled todo-tree.general.debug
and the open the debug channel in the Output window (View->Output and then select Todo Tree). Can you see what is in there?
Also, is there anything unusual about your workspace?
I'm having a similar issue on any workspace (no file watcher, issue goes away with tree disabled), the debug channel has no output.
Can you post your todo-tree settings (i.e. copy them from the json settings). The debug channel should show the command that is being sent to ripgrep - if that's not even being displayed then there is something very wrong happening. Can you also check if there is anything in the developer console (Help->Toggle Developer Tools)
I have a similar issue on v0.0.220, but instead of just consuming /tmp
space, it also makes VSCode completely unusable (https://github.com/microsoft/vscode/issues/167320).
Here's a cpuprofile that precisely shows where in todo-tree it spends 4 seconds, freezing everything else: exthost-91a0b1.cpuprofile.txt.
Can you enabled
todo-tree.general.debug
and the open the debug channel in the Output window (View->Output and then select Todo Tree). Can you see what is in there?
No, after intial piece of logged data nothing logged in that channel.
My workspace is nothing unusual, but it contains a git repository with a lot of XML files with the overall size about 32 GB (about 23 GB is a .git
folder).
There a lot of similar entries in the Window ("Окно" in my Russian VSCode) Log:
...
2023-02-01 16:17:01.974 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:17:14.768 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 83.339800817482% of 4168.611ms, saved PROFILE here: 'file:///tmp/exthost-4eb682.cpuprofile'
2023-02-01 16:17:28.115 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:17:41.863 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 83.58967900064674% of 4181.185ms, saved PROFILE here: 'file:///tmp/exthost-7d6a2e.cpuprofile'
2023-02-01 16:17:53.222 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:18:06.006 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 82.3743163182767% of 4120.332ms, saved PROFILE here: 'file:///tmp/exthost-5eb726.cpuprofile'
2023-02-01 16:19:46.338 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:19:59.519 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 82.8383527115278% of 4143.586ms, saved PROFILE here: 'file:///tmp/exthost-2e36c6.cpuprofile'
2023-02-01 16:23:16.498 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:23:19.298 [info] UNRESPONSIVE extension host: received responsive event and cancelling profiling session
2023-02-01 16:23:23.301 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 77.00753405389504% of 2157.095ms, saved PROFILE here: 'file:///tmp/exthost-bc0379.cpuprofile'
2023-02-01 16:25:45.442 [info] UNRESPONSIVE extension host: starting to profile NOW
2023-02-01 16:25:46.327 [info] UNRESPONSIVE extension host: received responsive event and cancelling profiling session
2023-02-01 16:25:47.087 [warning] UNRESPONSIVE extension host: 'gruntfuggly.todo-tree' took 52.06527909283683% of 461.352ms, saved PROFILE here: 'file:///tmp/exthost-f8714a.cpuprofile'
The last 2 profiles from that log: exthost-todo-tree-logs.zip
The last lines in Todo Tree output in View->Output (note that timings from yesterday, so it didn't log anything for more than a day):
...
13:35:18.700 Found 2351 items
13:35:18.700 Applying globs to 2351 items...
13:35:18.766 Remaining items: 2351
OK, so that's found nearly 2500 Todo's - is that what you would expect with your codebase? And you definitely haven't changed any of the default settings?
Can you scroll back in the output window and find the command it generated for the search? It should start with the path to ripgrep. The line before that should also show the pattern which it is searching for which would be good to see.
Would you be prepared to try out some debug versions of the extension for me? Because the extension is minified the cpu logs are very difficult to get much out of - if I post a .vsix package that should make it easier to pinpoint where the blockage is.
OK, so that's found nearly 2500 Todo's - is that what you would expect with your codebase?
Yes, that seems the case, although I do not need most of them. Probably, in my case the solution could be just ignore some folders.
And you definitely haven't changed any of the default settings?
Yes, the default settings except todo-tree.general.debug: true
.
Can you scroll back in the output window and find the command it generated for the search?
All "Pattern" lines shows the same regexp, all "Command" lines different only by the name of the -f
argument and the directory to find. The one of occurrences:
...
13:35:14.124 Searching /home/mingun/Projects/ksc-rs...
13:35:14.124 Writing pattern file:/home/mingun/.config/Code/User/workspaceStorage/34a1d0922531e34b34bc5aed6b6f6fb1/Gruntfuggly.todo-tree/2b8g2hcrfd.txt
13:35:14.124 Pattern:(//|#|<!--|;|/\*|^|^[ \t]*(-|\d+.))\s*(\[x\]|\[ \]|XXX|TODO|HACK|FIXME|BUG)
13:35:14.124 Command: /usr/share/code/resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config -f "/home/mingun/.config/Code/User/workspaceStorage/34a1d0922531e34b34bc5aed6b6f6fb1/Gruntfuggly.todo-tree/2b8g2hcrfd.txt" -g "!**/node_modules/*/**" "/home/mingun/Projects/ksc-rs"
13:35:14.597 Search results:
/home/mingun/Projects/ksc-rs/src/error.rs:15:35: Expression(ParseError<LineCol>),//TODO: Add information about field
13:35:14.768 Search results:
...("Search results" group repeated several times...)
13:35:18.686 Match (File): {"fsPath":"/home/mingun/Projects/ksc-rs/src/error.rs","line":15,"column":35,"match":" Expression(ParseError<LineCol>),//TODO: Add information about field","uri":{"$mid":1,"path":"/home/mingun/Projects/ksc-rs/src/error.rs","scheme":"file"}}
13:35:18.686 Match (File): {"fsPath":"/home/mingun/Projects/ksc-rs/formats/font/ttf.ksy","line":141,"column":15,"match":" # TODO","uri":{"$mid":1,"path":"/home/mingun/Projects/ksc-rs/formats/font/ttf.ksy","scheme":"file"}}
...(repeated "Match (File)" lines)...
13:35:18.700 Found 2351 items
13:35:18.700 Applying globs to 2351 items...
13:35:18.766 Remaining items: 2351
The log started at [2023-01-31] 13:28:04.447 and end at 13:35:18.766. That is strange that nothing logged after this time, I have a feeling that logging in that channel just stop working.
Would you be prepared to try out some debug versions of the extension for me?
Yes, I can do that.
OK thanks - I'll put together a debug version with some options and post it here.
I think the issue is simply the amount of items it is finding - and currently it builds a list of everything first then removes things you're not interested in - which is not the most efficient way to doing things!
In the short term, you can define todo-tree.filtering.includeGlobs
to limit the search to only folders you're interested in, which should help.
I'm also having this exact issue. It says Todo-Tree is continuously taking more than 2 seconds (every 5 seconds or so, sometimes, freezing the editor more like 40 seconds sometimes and making the editor unusable). To the point I had to disable it because it was being impossible to work.
I append that .cpuprofile file: exthost-7b45eb.cpuprofile.txt
Also, I created a debug channel, and nothing weird (IMHO):
...
16:21:05.993 Found 328 items
16:21:05.993 Applying globs to 328 items...
16:21:06.006 Remaining items: 328
(I think is not a crazy number or anything, and my workspace is not so big)
Todo-tree Is my fav and most useful extension without a doubt (thank you so much for it 🍀), so it hurts me so much not being able to use it. I really hope this gets fixed 🙏
Not a solution (the Edit: Well, not so much, still freezing a lotUNRESPONSIVE extension host: 'gruntfuggly.todo-tree'
and freezes still happening), but disabling the highlights reduced their frequency.
This seems a very weird rendering issue (I got those messages on renderer.log). I guess that despite disabling the highlights those message must be when rendering the tree or something.
Issue Type: Bug
This events generated constantly, VS Code starts profiling and collect 70 MB files of profiling every ten seconds, consuming space in /tmp.
This is content of Output page of the VS Code:
Attach the first two files from that log: exthost.zip
Extension version: 0.0.215 VS Code version: Code 1.65.2 (c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1, 2022-03-10T15:36:26.048Z) OS version: Linux x64 5.4.0-105-generic Restricted Mode: No
System Info
|Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3706)| |GPU Status|2d_canvas: enabledgpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled| |Load (avg)|3, 3, 3| |Memory (System)|31.05GB (0.26GB free)| |Process Argv|--unity-launch --crash-reporter-id 9971e083-5d53-4fa6-9ebd-ad3924f8b78d| |Screen Reader|no| |VM|0%| |DESKTOP_SESSION|ubuntu| |XDG_CURRENT_DESKTOP|Unity| |XDG_SESSION_DESKTOP|ubuntu| |XDG_SESSION_TYPE|x11|