Skip to content
Magento 2: faster compilation thanks to Mage-OS
E-commerce · 2 min read

Magento 2: faster compilation thanks to Mage-OS

One of the most interesting recent additions to Magento 2 (via Mage-OS) is PR #39723, proposed by Luca Fuser, which optimizes the compilation phase (di:compile), limiting it to active modules only.

What changes?

Until now, compilation generated files for all the modules present in the codebase, even disabled ones. This meant:

  • Longer deploy times
  • Needless creation of Interceptors and DI files for modules that are never loaded
  • Increased complexity and noise in build systems

With this change, Magento compiles only the modules that are actually active, making the deploy phase faster and more efficient.

Why it matters

  • Optimizes projects with many disabled custom or third-party modules
  • Reduces the load on CI/CD
  • Improves maintenance and debugging

Conclusion

Another concrete demonstration of the value Mage-OS is bringing to the Magento community: real contributions, focused on performance and simplicity. Great job, Luca!

You might also like