Skip to content

Performance problem - big arrays #8504

@ondrejmirtes

Description

@ondrejmirtes

Feature request

This file https://github.com/mmarton/phpstan-issue8146/blob/master/src/DataFixtures/LocationFixtures.php from #8146 really slows PHPStan down, because it contains a lot of literal arrays.

The performance was better before: phpstan/phpstan-src#1741

This PR phpstan/phpstan-src#1830 looked promising, it improved the performance on 1.8.x, but after rebasing on 1.9.x, it's slow again.

This PR phpstan/phpstan-src#2077 (basically a revert of phpstan/phpstan-src#1741) helps to solve this problem by dumbing down huge constant arrays (making types less precise) at the cost of new false positives because of the lost precision.

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