fsautocomplete.dll process using high CPU when FSharp.lineLens.enabled is set to "never"
Hit this issue yesterday and couldn't figure out why my CPU was running so high for a dotnet process while VS Code was open. Ran the Process Explorer to investigate and found that the following item was the culprit:
/usr/local/share/dotnet/dotnet --roll-forward LatestMajor /Users/mikebmc/.vscode/extensions/ionide.ionide-fsharp-6.0.6/bin/fsautocomplete.dll --state-directory /Users/mikebmc/Library/Application Support/Code/User/workspaceStorage/84445bde22dfb1290ff5b0ac39696c1c/Ionide.Ionide-fsharp
Opening an fsx file would cause CPU usage to skyrocket 150-200 out of nowhere. Had the thought that it may be some custom configuration set, so I went through my settings.json and started removing lines and checking for improvement. Sure enough, when I deleted the following line the issue was resolved:
"FSharp.lineLens.enabled": "never",
Note: replaceCodeLens and always, which are the other two options for this config, do not seem to have this issue.
Happy to run any other tests if needed, or if this is the wrong repo for this issue then my apologies and am happy to move it elsewhere.
That's a really interesting report - I bet it's because line lens returns every declaration in the file in one giant array. I bet if this was paginated or streamed in some way that the memory use wouldn't be so high. That's a very rough guess, though.