Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Get-ChildItem 3x: Replace NoteProperties on FileSystem- and RegistryProvider by class backed CodeProperties. #7501

Copy link
Copy link
@powercode

Description

@powercode
Issue body actions

When using Get-ChildItem, the ProviderBase adds these note properties:

PSChildName
PSDrive
PSIsContainer
PSParentPath
PSPath
PSProvider

This is quite expensive, both in terms of memory and execution time.

By replacing the noteproperties with a classes that lazily can compute most of the values, we can save both storage and time.

Timing:

Command 6.1-preview After change Speedup
GCI -rec -for d:\source\powershell 0.446 0.144 3.1 x
GCI -rec -for c:\windows -ea:0 12.24 6.05 2 x
GCI -rec hkcu:\ -ea:0 7.86 2.99 2.6 x

Cred to @lzybkr - this was his idea, not mine.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerBreaking-Changebreaking change that may affect usersbreaking change that may affect usersCommittee-ReviewedPS-Committee has reviewed this and made a decisionPS-Committee has reviewed this and made a decisionResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Engine-Performancecore PowerShell engine, interpreter, and runtime performancecore PowerShell engine, interpreter, and runtime performanceWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.built-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.