Measure-Command { 1..100 | % { get-service sshd } }
About the same time on both PS7 and WinPS 5.1
WinPS5.1 took 100ms on my machine
PS7 took 532ms on same machine
Name Value
---- -----
PSVersion 7.0.0-preview.1
PSEdition Core
GitCommitId 7.0.0-preview.1
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
My measure 526 vs 32
It come from #4907 where we added properties (BinPath, Description, UserName and Delayed Auto Start).
It seems the fix should be to move the properties to ETS and get its on demand only.
mine is (pwsh)32 Vs (powershell)1 ms
Name Value
---- -----
PSVersion 7.0.0-preview.1
PSEdition Core
GitCommitId 7.0.0-preview.1
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0螕脟陋}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
@kvprasoon I want to have your computer :-))))
@iSazonov , srry, I'll have to ask my manager... 馃槢
I just came across this code, where ETS types are added to Get-Service
output, and since this issue is related, I wanted to ask a few questions:
Why are the ETS type names prefixed with System.Service.ServiceController
and not the actual System.ServiceProcess.ServiceController
type? This seems incorrect.
Why are we inserting custom type names for each added NoteProperty
? I've used ETS very heavily over the past 12 years, and while I've identified an extended type using one custom ETS name, or perhaps several if I have a hierarchy like a class hierarchy, I've never added one ETS type name per property added. That feels redundant and unnecessary, and I think these types should either be removed or replaced with a single ETS type name of System.ServiceProcess.ServiceController#Extended
.
I know these should be logged as an additional issue or two, and I'll do that. I just want confirmation on the issues first since I don't have the background on why these were added with ETS names like this.
Why are the ETS type names prefixed with System.Service.ServiceController and not the actual System.ServiceProcess.ServiceController type? This seems incorrect.
It is tricky bug :-) - no automatic display but direct access works.
For second, the intention was to use this in formatting system views. We could keep this if we make the properties "calculate-only-by-demand" for performance.
Most helpful comment
I just came across this code, where ETS types are added to
Get-Service
output, and since this issue is related, I wanted to ask a few questions:Why are the ETS type names prefixed with
System.Service.ServiceController
and not the actualSystem.ServiceProcess.ServiceController
type? This seems incorrect.Why are we inserting custom type names for each added
NoteProperty
? I've used ETS very heavily over the past 12 years, and while I've identified an extended type using one custom ETS name, or perhaps several if I have a hierarchy like a class hierarchy, I've never added one ETS type name per property added. That feels redundant and unnecessary, and I think these types should either be removed or replaced with a single ETS type name ofSystem.ServiceProcess.ServiceController#Extended
.I know these should be logged as an additional issue or two, and I'll do that. I just want confirmation on the issues first since I don't have the background on why these were added with ETS names like this.