Skip to content

ContainerFactory::clearOldContainers() can take an enormous amount of time on Windows #5825

@dktapps

Description

@dktapps

Bug report

When analysing pmmp/PocketMine-MP@701a71a on Windows with dev deps installed, 8.0.11, opcache disabled, PHPStan takes a significant amount of time to do ... apparently nothing when running vendor/bin/phpstan analyse or vendor/bin/phpstan clear-result-cache.

The below video demonstrates this:

  • vendor/bin/phpstan clear-result-cache takes 5 seconds to do apparently nothing
  • vendor/bin/phpstan analyze (00:15 - 01:43) after clearing results cache takes a whopping 1min 10sec to do nothing whatsoever; the actual scan of the code takes only 17sec (01:26 - 01:43)
  • vendor/bin/phpstan analyze (01:46 - 01:53) with results cache takes a whole 7 seconds just to apparently load the results cache.

https://youtu.be/0xFON6kY6zo (might not be immediately available, still being processed by YT)

What exactly is going on here? This is really negatively impacting the UX for me.

The issue with pre-analysis taking several seconds (as seen in step 1 and 3) is an annoying problem I've seen for quite some time, but step 2 taking over 1 minute to do nothing visible is pretty extreme.

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