Skip to content

Huge arrays are super slow to scan with Squiz.Arrays.ArrayDeclaration sniff #1681

Closed
@dawehner

Description

@dawehner

We recently had a file where scanning a single file takes > 40s

RectangleTest.php.txt

We've made some analysis why this was done https://www.drupal.org/node/2911280#comment-12270785

I'm wondering whether it would be possible to fix this in phpcs itself? For now we have a custom fix which involves moves the data to a json file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions