Skip to content

Poor performance in recent versions #7581

@adnweedon

Description

@adnweedon

Bug report

Our team has been using PHPStan version 1.4.10 - I've been working hard to get people using in their workflows, because it's great! However, I updated to v1.8.0 today, and immediately had much worse performance. I've done some benchmarking (that has taken most of the afternoon...), but with the same config on the same files (clearing the cache inbetween), I've seen the following performance:

v1.4.10 - 0.34s user 0.22s system 0% cpu 4:21.61 total
v1.5.0 - 0.36s user 0.36s system 0% cpu 7:48.78 total
v1.6.0 - 0.43s user 0.95s system 0% cpu 17:15.50 total
v1.7.0 - 0.58s user 1.78s system 0% cpu 35:55.40 total
v1.8.0 - 0.57s user 1.57s system 0% cpu 33:14.82 total

This was tested running inside Docker (as we have been doing for a long time), on our codebase of 2590 files. Docker has 6 cores available, the processTimeout setting is set to 300s, and the command we're using to run it is
../../vendor/bin/phpstan analyse --memory-limit=4G

Code snippet that reproduces the problem

No one file in particular!

Did PHPStan help you today? Did it make you happy in any way?

PHPStan is amazing and has really helped us in lots of ways; as I mentioned further up, I'm trying to get my colleagues using it (and installing it in a pipeline)! Until I can get it running quickly, though, I'll struggle!

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