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

[TASK] Optimize compiled code of condition VHs #790

Merged
merged 1 commit into from
May 14, 2023
Merged

[TASK] Optimize compiled code of condition VHs #790

merged 1 commit into from
May 14, 2023

Conversation

lolli42
Copy link
Member

@lolli42 lolli42 commented May 14, 2023

The AbstractConditionViewHelper based VH's take
care of children on their own. There is no need
to have them within compiled PHP code a second
time.

The patch adds a custom convert() method to
AbstractConditionViewHelper that optimizes
the generated PHP code accordingly.

This has a huge impact especially on f:if with
large bodies in practice, generated compiled
template code can shrink by half in size.

Resolves: #771

The AbstractConditionViewHelper based VH's take
care of children on their own. There is no need
to have them within compiled PHP code a second
time.

The patch adds a custom convert() method to
AbstractConditionViewHelper that optimizes
the generated PHP code accordingly.

This has a huge impact especially on f:if with
large bodies in practice, generated compiled
template code can shrink by half in size.

Resolves: #771
@lolli42 lolli42 merged commit bde33a0 into main May 14, 2023
4 checks passed
@lolli42 lolli42 deleted the lolli-2 branch May 14, 2023 15:17
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

Successfully merging this pull request may close these issues.

If VH creates massive overhead in compiled templates
2 participants