Skip to content

faster IgnoredError->shouldIgnore()#736

Merged
ondrejmirtes merged 1 commit intophpstan:masterfrom
staabm:fast-ignore
Oct 25, 2021
Merged

faster IgnoredError->shouldIgnore()#736
ondrejmirtes merged 1 commit intophpstan:masterfrom
staabm:fast-ignore

Conversation

@staabm
Copy link
Copy Markdown
Contributor

@staabm staabm commented Oct 25, 2021

object creation of FileExcluder requires a lot of path normalization.

this PR moves the object creation after the fast-exit IF condition, which prevents the object creation in most cases and leads to major speed improvements.

comparison before/after this change

grafik

grafik

also note a improvement in memory consumption.

profiles compared are based on the latest commit on master b726e08

@staabm staabm marked this pull request as ready for review October 25, 2021 13:00
@ondrejmirtes ondrejmirtes merged commit 0e42081 into phpstan:master Oct 25, 2021
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you!

@staabm staabm deleted the fast-ignore branch October 25, 2021 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants