Skip to content

IBX-11652: Optimize compilation approach for frontend assets#243

Merged
dew326 merged 1 commit intomasterfrom
IBX-11652-Optimize-compilation-approach-for-frontend-assets
Apr 22, 2026
Merged

IBX-11652: Optimize compilation approach for frontend assets#243
dew326 merged 1 commit intomasterfrom
IBX-11652-Optimize-compilation-approach-for-frontend-assets

Conversation

@OstafinL
Copy link
Copy Markdown
Contributor

🎫 Issue IBX-11652

Description:

For QA:

Documentation:

@github-actions
Copy link
Copy Markdown

Thanks for contribution! 🎉

To test the changes please execute:

composer config extra.symfony.endpoint https://api.github.com/repos/ibexa/recipes-dev/contents/index.json?ref=flex/pull-243

before executing the recipes.

@OstafinL OstafinL force-pushed the IBX-11652-Optimize-compilation-approach-for-frontend-assets branch from 8581211 to 3a92ffb Compare April 21, 2026 11:49
@sonarqubecloud
Copy link
Copy Markdown

@micszo micszo self-assigned this Apr 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Symfony Flex recipe manifests to change how frontend Encore assets are compiled during Composer auto-scripts, aiming to optimize the compilation approach across Ibexa 5.0 editions.

Changes:

  • Replaces a single multi-config ibexa:encore:compile --frontend-configs-name ibexa,internals,libs,richtext script entry with four per-config compile entries.
  • Applies the same composer-scripts change consistently across OSS, Headless, Experience, and Commerce 5.0 recipe manifests.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
ibexa/oss/5.0/manifest.json Splits frontend Encore compilation into four per-config script entries.
ibexa/headless/5.0/manifest.json Splits frontend Encore compilation into four per-config script entries.
ibexa/experience/5.0/manifest.json Splits frontend Encore compilation into four per-config script entries.
ibexa/commerce/5.0/manifest.json Splits frontend Encore compilation into four per-config script entries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +165 to +168
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running ibexa:encore:compile four times (once per frontend config) will boot Symfony and execute the compilation pipeline four times during install/build, which typically adds noticeable overhead versus a single compilation run. Unless the command cannot accept multiple config names per invocation, it’s usually more efficient to keep a single command and pass all requested configs at once.

Suggested change
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name ibexa --frontend-configs-name internals --frontend-configs-name libs --frontend-configs-name richtext": "symfony-cmd",

Copilot uses AI. Check for mistakes.
Comment on lines +172 to +175
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This replaces one multi-config ibexa:encore:compile command with four separate commands. Since Composer runs these auto-scripts sequentially, this will usually increase total build time due to repeated Symfony console bootstrap and repeated compilation setup work. If the intent is improved caching or incremental builds, consider consolidating into a single invocation (if supported) or explain why multiple invocations are required.

Suggested change
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name ibexa --frontend-configs-name internals --frontend-configs-name libs --frontend-configs-name richtext": "symfony-cmd",

Copilot uses AI. Check for mistakes.
Comment on lines +97 to +100
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change replaces a single ibexa:encore:compile invocation with four separate console invocations. Because each entry boots Symfony and runs the command separately, this typically increases install/build time and resource usage (and can reduce the intended “optimization” benefit). If the goal is to compile these configs separately, consider doing it within a single command invocation (e.g., passing multiple config names in one run if supported) or document why multiple invocations are required here.

Suggested change
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name ibexa --frontend-configs-name internals --frontend-configs-name libs --frontend-configs-name richtext": "symfony-cmd",

Copilot uses AI. Check for mistakes.
Comment on lines +146 to +149
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splitting the frontend assets compilation into four separate ibexa:encore:compile script entries means Symfony is booted four times during composer auto-scripts. That usually increases overall installation/build time and CPU/memory usage compared to compiling all requested configs in a single command run. If there’s a functional reason to split these (e.g., caching/partial rebuild behavior), it would help to keep a single invocation if possible or add a brief justification in the recipe history/PR description.

Suggested change
"ibexa:encore:compile --frontend-configs-name ibexa": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name internals": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name libs": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name richtext": "symfony-cmd",
"ibexa:encore:compile --frontend-configs-name ibexa --frontend-configs-name internals --frontend-configs-name libs --frontend-configs-name richtext": "symfony-cmd",

Copilot uses AI. Check for mistakes.
@dew326 dew326 merged commit 5b93f4e into master Apr 22, 2026
7 checks passed
@dew326 dew326 deleted the IBX-11652-Optimize-compilation-approach-for-frontend-assets branch April 22, 2026 10:16
@micszo micszo removed their assignment Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants