Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kukulich opened this issue Feb 26, 2025 · 1 comment
Open

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

kukulich opened this issue Feb 26, 2025 · 1 comment

Comments

@kukulich
Copy link
Contributor

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

@dg
Copy link
Member

dg commented Feb 26, 2025

I don't have Blackfire. Could you check where those allocations occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants