Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance regression on array structures in 1.8.3 #7902

Closed
leongersen opened this issue Sep 2, 2022 · 2 comments
Closed

Performance regression on array structures in 1.8.3 #7902

leongersen opened this issue Sep 2, 2022 · 2 comments

Comments

@leongersen
Copy link
Contributor

I'm running into a performance regression between 1.8.1 and 1.8.3.

This file contains a lot of array structures, and is already fairly slow on 1.8.1. On 1.8.3, the time to analyse explodes.

bin/phpstan analyse <file>.php --debug -vvv

On 1.8.1:

--- consumed 70.5 MB, total 118.5 MB, took 33.14 s

On 1.8.3:

--- consumed 72.5 MB, total 122.5 MB, took 264.10 s

The file in question is full of business logic and references other classes, so I took the time to strip it down to something without dependencies.

Analysis of this stripped file in 1.8.3 shows a 10x slowdown compared to 1.8.1:

On 1.8.1:

--- consumed 18 MB, total 46 MB, took 6.40 s

On 1.8.3:

--- consumed 28 MB, total 78 MB, took 68.58 s

Stripped down file:
file.php.txt

@mergeable mergeable bot closed this as completed Sep 2, 2022
@mergeable
Copy link

mergeable bot commented Sep 2, 2022

Hi there! 👋

Looks like you opened an issue without following one of the issue templates:

Bug report 🐛 (open an issue)

If something isn't working as expected 🤔.

Feature request 🚀 (open an issue)

I have a suggestion (and may want to implement it 🙂)!

Support question ❓ (open a discussion)

I need some help with my code because PHPStan doesn't like it.


The current issue will be closed. This is a precaution to save maintainer's time, I hope you'll understand.

Sincerely, the bot 🤖

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant