-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excessive CPU usage w/ reduced interactiveness on M1 Mac #925
Comments
Yeah! A trace with a flamegraph or something would help us diagnose a root cause. |
this appears intermittent, does not happen after restart :/ -- will report with flamegraph or close later if I cannot reproduce this |
I want to say that I've felt but not measured similar when working on the F# compiler itself - I wonder if we're hitting some size threshold? Or if we're 'holding the APIs wrong'? |
here is fsautocomplete_20220419_151039.speedscope.json.zip -- this is a trace running for about 16 secs for now I cannot use fsac on battery since fsac kills it :) |
Curiously this only happens on M1/aarch64 and I cannot replacate this issue on my x86/AMD desktop Linux machine. And then I cannot analyze dumps and do Closing, presumably things will get better with .NET 7 or later releases.. |
interesting note - I've had reports that the background services are broken on M1, maybe this is the case for you? if you disable the background services do you see the same high usage? |
let me see.. |
nah, same issue happens with no background service enabled, -- a lot of threads are busy in
can't figure out async trace due to dotnet dump not working for me on this machine |
Could it be related to dotnet/sdk#23267? |
that looks like a sdk issue to me, but this one is related to F# libraries/fsac interaction, IMHO |
Have you tried with .net 7 preview? |
not yet, will do later today; there reports of this happening (high cpu usage) on non-arch related issue, like #975 so it coul dbe that the default settings of emacs+lsp over fsac were triggering this behaviour |
I've tried a bunch of various settings with emacs+lsp and the latest fsac and just cannot get the CPU to calm down. The CPU stays pegged very high. Disabling lsp and using Eglot works perfectly for me (although I miss some of the features like inline hints). I'm on Intel macOS. |
I think this has been fixed with the latest version; cannot replicate anymore with v0.56.2 the fix most probably was #977 by @Krzysztof-Cieslak closing |
Oh, it seems the CPU issue is back for me on my M1 machien, so the relief was temporary/triggered by some state/project contents |
Since this seems like a dotnet/runtime issue I'm gonna close this. |
I am working on https://github.com/razzmatazz/csharp-language-server and with the latest fsac there appears to be an excessive CPU usage running for a very long time (10 mins +) ; the intectiveness of LSP server is significantly reduced too
dotnet stack report produces this:
most of code seems to be within fsharp.compiler -- and this is running even if I am not doing anything in the editor for a long time (5mins +) -- this is on a m1 mac (10 cores)
not sure if I should produce a profiler report or something?
The text was updated successfully, but these errors were encountered: