Skip to content

Yaml\Parser isBlockScalarHeader is slow #27960

Closed
@staabm

Description

@staabm

Symfony version(s) affected: 3.4.11

Description
when parsing yaml files the method Yaml\Parser::isBlockScalarHeader is oftentimes on the hotpath, because doing a lot of preg_match calls.

see
grafik

would it make sense to do a cheaper fast-fail check before actually invoking the regex-engine?

I do not have yet a proper feeling of what this method is trying to check and why, so my suggestion might be rubbish.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions