Skip to content

Very long analysis of Propel2 queries #4581

@pyguerder

Description

@pyguerder

Bug report

During my analysis for #4072 I have looked at the files that take the longest time to analyze. In my project, most of those files contain queries for the Propel2 ORM. Those code blocks are very similar to those reported by @alfredbez in #4072.

Code snippet that reproduces the problem

I obtained a minimal example with two simple classes https://github.com/pyguerder/phpstan-propel2-example/blob/master/generated-classes/App/AnalyzeMe1.php and https://github.com/pyguerder/phpstan-propel2-example/blob/master/generated-classes/App/AnalyzeMe2.php

Even though those two classes are very simple, PHPStan needs ~ 10 seconds each, to analyze. In my projects, I have hundreds of blocks with this kind of structures which may explain why PHPStan needs 5 to 10 min on those projects.

Expected output

I would expect analysis to take at most 1 second... (I have much more complex classes analyzed in < 1 s.).

I am opening a new issue, because this is more related to time than memory consumption.

Would you mind having a look at those? You will find the commands to run in https://github.com/pyguerder/phpstan-propel2-example/blob/master/HELP

Thanks a lot in advance. Best regards

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