Skip to content

PhpHelpers::optimizeEcho() is very memory consuming #388

@kukulich

Description

@kukulich

We have problem after upgrade to PHP 8.4 that generating templates consumes a lot memory. We don't know what changes in PHP 8.4 but I think it does not matter. We use Blackfire to profile it and see the result in screenshot.

The problem is token_get_all in PhpHelpers::optimizeEcho(). Would it be possible to implement parametr $optimize in TemplateGenerator::generate() so the optimization could be disabled?

We are ready to provide the PR.

Image

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