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

The globbing code is possibly doing duplicate work when filtering path like C:\Windows\System32\p* #10093

Copy link
Copy link
@daxian-dbw

Description

@daxian-dbw
Issue body actions

A fast path is added to WildcardPattern.IsMatch for patterns like test*. However, this shows no noticeable improvements to dir -Recurse C:\Windows\System32\p*.
Quoted from @iSazonov's comment #10054 (comment)

When we send a path like C:\Windows\System32\p* to engine our globbing code does all work - parse and expand p* to a collection with leaves. Then the already filtered leaves (in the example, all started with "p") is passed to a code which again filters the leaves by WindcardPattern.IsMatch(). So (1) we don't filter large, all full path list, only small collection of leaves - that's why we get so little acceleration, (2) we do duplicated work that we would address, I believe it is common problem in globbing code - there is many places where it happens.

So it's possible our globing code is doing duplicate filtering, and it would be an optimization opportunity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-FileSystem-Providerspecific to the FileSystem providerspecific to the FileSystem providerIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-No ActivityIssue has had no activity for 6 months or moreIssue has had no activity for 6 months or moreWG-Cmdlets-Managementcmdlets in the Microsoft.PowerShell.Management modulecmdlets in the Microsoft.PowerShell.Management moduleWG-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

    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.