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 some VHs #791

Merged
merged 1 commit into from
May 15, 2023
Merged

[TASK] Optimize compiled code of some VHs #791

merged 1 commit into from
May 15, 2023

Conversation

lolli42
Copy link
Member

@lolli42 lolli42 commented May 15, 2023

There are a couple of view helpers that never
render the body closure as such. Those still
create unused code within compiled templates.

We can shortcut compilation in these VH's a
bit to create smaller compiled templates.

The patch has a huge positive effect on
compiled templates sizes especially due
to the f:section change, which until now
contained the entire body of each section
within the files twice.

f:comment - Obviously, comments are never rendered. f:layout - Layouts are resolved at a different
level and the VH has no support for
different children.
f:section - Sections are resolved at a different
level and called via f:render. It's
compiled variant does not need to
take care of bodies itself.

There are a couple of view helpers that never
render the body closure as such. Those still
create unused code within compiled templates.

We can shortcut compilation in these VH's a
bit to create smaller compiled templates.

The patch has a huge positive effect on
compiled templates sizes especially due
to the f:section change, which until now
contained the entire body of each section
within the files twice.

f:comment - Obviously, comments are never rendered.
f:layout - Layouts are resolved at a different
           level and the VH has no support for
           different children.
f:section - Sections are resolved at a different
            level and called via f:render. It's
            compiled variant does not need to
            take care of bodies itself.
@lolli42 lolli42 merged commit 5a93abe into main May 15, 2023
4 checks passed
@lolli42 lolli42 deleted the lolli-1 branch May 15, 2023 14:00
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.

None yet

2 participants