-
Notifications
You must be signed in to change notification settings - Fork 671
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
Consistent high cpu load in latest preview (v.2.48.31) #7582
Comments
@tverboon which process is causing the high CPU usage? You may need to post the process command line string to differentiate (on Mac the C# extension processes are usually all Once you've identified the process, could you collect a trace of it via dotnet-trace? You can email it to me ([email protected]) if you don't want to upload here. Thanks! |
It's actually ReleaseRelease.mp4PreviewPreview.mp4TraceLast part of loading trace of preview. I don't think this process is a problem at this point. dotnet_20240925_074526.nettrace.zip SummaryConsistent high CPU load is not the issue. |
@tverboon thanks, I will take a look at the trace to see if anything stands out. The
|
@dibarbet thanks. I will investigate the extensions tomorrow. What do you think about the multiple attempts to load the razor files, because part of the directory path is duplicate causing files not being found? Could that be the issue why loading the projects takes much longer? |
To confirm - loading projects w/ C# extension prerelease takes 3 minutes, but 42 seconds in release? And it is the same version of C# Dev Kit both times? I wouldn't think that the Razor file loading attempts would slow down project loading, but tagging @ryzngard in case he's seen anything there. I'll need to dig into the trace to figure out more. |
Confirmed. Everything else is the same. I only switch between release and prerelease of the C# extension. Then I quit and start VSCode to start fresh. |
File paths being wrong could be a bug, but I wouldn't expect it to fix over time. For the razor logs it would be a bit more helpful to enable trace logging with this config "razor.server.trace": "Trace" if you don't feel comfortable posting the logs on GH feel free to e-mail them to my MS address directly but please zip :) |
@dibarbet Previewdotnet_20240926_081730.nettrace.zip Release |
@ryzngard From the logging it seems that the right paths are loaded also. See attached. |
Thanks! Will take a look at these today. |
Type: Bug
Issue Description
While loading projects CPU usage is consistently around and above 100% CPU. That's 1 core on Mac.
Steps to Reproduce
Start VSCode and load our solution with latest C# plugin.
Expected Behavior
After loading projects cpu usage should come down.
Actual Behavior
Keeps opening and closing files causing high cpu usage.
Logs
Latest preview v2.48.31
Latest release v2.45.25
I hoped to only paste logs that are relevant, but I can upload everything when this is not enough.
The most obvious difference is, the parent directory file path is duplicated in the latest preview release.
/Users/tverboon/Desktop/Code/Midmid/src/Midmid.Shop.Common.Web/Users/tverboon/Desktop/Code/Midmid/src/Midmid.Shop.Common.Web/Views/Shared/DisplayTemplates/EmailAddress.cshtml__virtual.cs
It also seems to be only happening with razor files.
Razor logs:
The last line is warning that the file didn't exist, I am sure it doesn't because that path also has the duplicate parent folder.
Environment information
VSCode version: 1.93.1
C# Extension: 2.48.31
Using OmniSharp: false
Dotnet Information
.NET SDK: Version: 8.0.104 Commit: 034f91fcc0 Workload version: 8.0.100-manifests.9f663350Runtime Environment:
OS Name: Mac OS X
OS Version: 14.6
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/8.0.104/
.NET workloads installed:
Workload version: 8.0.100-manifests.9f663350
There are no installed workloads to display.
Host:
Version: 8.0.4
Architecture: arm64
Commit: 2d7eea2529
.NET SDKs installed:
6.0.300 [/usr/local/share/dotnet/sdk]
7.0.202 [/usr/local/share/dotnet/sdk]
8.0.104 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.4 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.45.25
VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z)
OS version: Darwin arm64 23.6.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: