dotnet/runtime

Principal.FindByIdentity() method is extremely slow

開放

#34,598 建立於 2020年4月6日

 (10 則留言) (0 個反應) (1 位負責人)C# (5,445 個分叉)batch import
area-System.DirectoryServiceshelp wantedtenet-performance

倉庫指標

星標
 (17,886 顆星)
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.

貢獻者指南