Skip to content

Speed up ignoreErrors processing on big baselines #2804

@b1rdex

Description

@b1rdex

We switched from lvl5 to 6 and generated baseline ~1mb (yeah, there are lots of things with no type hints). CI task running phpstan grew from 5 mins to 12+. As far as I see, that 5 mins added are spent not on analyzing, but rather on processing analysis results. So progress bar is filled up within 6 minutes, and then 5+ minutes is (I assume) spent doing results processing.

Is there any way to speed up errors processing? Looking through https://github.com/phpstan/phpstan-src/blob/a2c04036578f9a7d03c28a7e0414749c96724ec2/src/Analyser/IgnoredError.php#L54 I guess that the main impact is in the \Nette\Utils\Strings::match() call, that sets errors handler and removes it each call. Is it really needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions