dotnet/runtime

Principal.FindByIdentity() method is extremely slow

Open

#34,598 创建于 2020年4月6日

在 GitHub 查看
 (10 评论) (0 反应) (1 负责人)C# (5,445 fork)batch import
area-System.DirectoryServiceshelp wantedtenet-performance

仓库指标

Star
 (17,886 star)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

In PowerShell repo we started porting Microsoft.PowerShell.LocalAccounts module to System.DirectoryServices.AccountManagement API (from p/invokes). We had to use workarounds because Principal.FindByIdentity() methods is extremely slow - up to 100x(!) vs Principal.PrincipalSearcher().

On my notebook Get-LocalUser name ported cmdlet takes 2.8 sec(!) vs 25 ms if a workaround is used.

贡献者指南