You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get-ChildItem 3x: Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties. #7501
The classes in question (e.g. system.io.fileinfo) are sealed, meaning you can't just inherit from them... so what did you test? (Nevermind, I looked at the PR).
So you can definitely add properties in the TypeData as CodeProperty (resulting in a lazy load, but still C# evaluation) instead of adding them as pre-calculated NoteProperty ... There is no question of whether that's "ok" (To implement the property as a static on a helper class). I'd say, if TypeData properties work for output from provider cmdlets, then it makes sense to me to do it that way!
I think to get the full picture of perf. you'd need to test it piping through other commands, since so many of them use the PSPath property, for instance get-childitem | get-item ... or something.
Joel Bennett (@Jaykul) I was more thinking about the use case when you instantiate the FileInfo by newing it up. Then it will not have the backing property object, and these CodeProperties will still be there, but empty.
That is a change from before, when these properties was not there at all, since they are added per instance by the provider.
changed the title [-]Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties.[/-][+]Get-ChildItem 3x: Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties.[/+]on Aug 13, 2018
@PowerShell/powershell-committee reviewed this. Would suggest putting this feature behind an experimental flag to determine if this breaks any customers.
I completely agree. This is kind of an experiment right now - I'm also looking at derived PSObject types and changing the binders. That seems to have more potential performance wise. Both should probably be behind an experimental flag.
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commented on Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
Activity
powercode commentedon Aug 11, 2018
Memory:
The yellow is after the change.
This was measured before and after running
A quite substantial memory reduction.
powercode commentedon Aug 11, 2018
One thing to consider is if it is OK to add CodeProperties to
System.IO.FileInfoandSystem.IO.DirectoryInfo.Jaykul commentedon Aug 12, 2018
The classes in question (e.g. system.io.fileinfo) are sealed, meaning you can't just inherit from them... so what did you test? (Nevermind, I looked at the PR).
So you can definitely add properties in the TypeData as CodeProperty (resulting in a lazy load, but still C# evaluation) instead of adding them as pre-calculated NoteProperty ... There is no question of whether that's "ok" (To implement the property as a static on a helper class). I'd say, if TypeData properties work for output from provider cmdlets, then it makes sense to me to do it that way!
I think to get the full picture of perf. you'd need to test it piping through other commands, since so many of them use the PSPath property, for instance
get-childitem | get-item... or something.powercode commentedon Aug 13, 2018
Joel Bennett (@Jaykul) I was more thinking about the use case when you instantiate the FileInfo by newing it up. Then it will not have the backing property object, and these CodeProperties will still be there, but empty.
That is a change from before, when these properties was not there at all, since they are added per instance by the provider.
iSazonov commentedon Aug 13, 2018
Should we ask PowerShell Committee? /cc Steve Lee (@SteveL-MSFT) Dongbo Wang (@daxian-dbw)
[-]Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties.[/-][+]Get-ChildItem 3x: Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties.[/+]Jaykul commentedon Aug 14, 2018
Staffan Gustafsson (@powercode) I would still say that I can't imagine how adding those properties through ETS could cause a problem. 😁
SteveL-MSFT commentedon Sep 19, 2018
@PowerShell/powershell-committee reviewed this. Would suggest putting this feature behind an experimental flag to determine if this breaks any customers.
powercode commentedon Sep 20, 2018
I completely agree. This is kind of an experiment right now - I'm also looking at derived PSObject types and changing the binders. That seems to have more potential performance wise. Both should probably be behind an experimental flag.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 16, 2023
This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.