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

Improve expression resolving of superglobals #3762

Draft
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

Conversation

herndlm
Copy link
Contributor

@herndlm herndlm commented Dec 30, 2024

⚠️ This is a re-do of #2012 which caused performance issues. ⚠️

I tried to do some simple testing, but didn't notice much of a difference on where I ran this (a VM, don't have anything better right now, sorry):

before:

→ hyperfine --prepare 'php bin/phpstan clear-result-cache -q' 'php -d memory_limit=448M bin/phpstan'
Benchmark 1: php -d memory_limit=448M bin/phpstan
  Time (mean ± σ):     73.668 s ±  1.285 s    [User: 262.490 s, System: 3.837 s]
  Range (min … max):   72.091 s … 76.341 s    10 runs

after:

→ hyperfine --prepare 'php bin/phpstan clear-result-cache -q' 'php -d memory_limit=448M bin/phpstan'
Benchmark 1: php -d memory_limit=448M bin/phpstan
  Time (mean ± σ):     73.868 s ±  0.507 s    [User: 264.315 s, System: 3.717 s]
  Range (min … max):   73.323 s … 75.092 s    10 runs

it would be interesting if #2012 (comment) still happens and, if so, if we can get more details here to maybe improve it before I forget about this again.

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.

1 participant