Skip to content

Replace PowerShell operators with .NET methods for parsing and serialization performance #30

Description

Why

ConvertFrom-Yaml and ConvertTo-Yaml process every line and scalar through several private helpers that currently use PowerShell operators (-split, -replace, -match, -contains) where equivalent .NET methods would run significantly faster. On large YAML documents the cumulative overhead is measurable, since PowerShell operators carry regex compilation, case-folding, and boxing costs that .NET methods avoid.

What

Internal parsing and serialization helpers should prefer .NET string and collection methods over PowerShell operators when the operator's extra capabilities (regex, wildcard, case-insensitive matching) are not needed, with no behavioral change.

Acceptance criteria

  • Parsing and serialization use .NET string/collection methods in place of PowerShell operators where the operator's extra capabilities aren't needed
  • All existing tests continue to pass with no behavioral changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions