Skip to content

WMI is replaced by IDebugClient.#13560

Draft
MichalPavlik wants to merge 2 commits intomainfrom
dev/mipavlik/remove-wmi
Draft

WMI is replaced by IDebugClient.#13560
MichalPavlik wants to merge 2 commits intomainfrom
dev/mipavlik/remove-wmi

Conversation

@MichalPavlik
Copy link
Copy Markdown
Member

@MichalPavlik MichalPavlik commented Apr 17, 2026

Fixes #13522

Context

WMI is causing hang.

Changes Made

WMI implementation was replaced by IDebugClient.

Testing

Existing unit tests.

Notes

Method Mean Error StdDev Ratio
'WMI (old)' 77,630.7 us 25,966.29 us 1,423.30 us 1.000
'dbgeng IDebugClient (new)' 165.1 us 62.87 us 3.45 us 0.002

Comment on lines +171 to +172
/// without querying WMI and without directly calling <c>NtQueryInformationProcess</c>. This avoids the
/// performance and reliability issues of the WMI service while still using only documented public APIs.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd argue this belongs in pr description and not source

@JeremyKuhne
Copy link
Copy Markdown
Member

Nice find. I'll add this approach to the PR I'm creating and I'll link it. Note that there is an GetRunningProcessDescriptionWide version of the API which will avoid converting from ANSI.

Note that from a quick perusal of the debugger code, it is hard to tell what all the implications are of using the debug API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet run --file hangs during restore when PackageVersion is missing

3 participants