magento

Compiler Mode in Magento


What is compiler mode in Magento?

I want to know this concept, Let me know if any one knows?


Solution

  • Google -> "magento compiler mode" first hit:

    It turns out that having PHP search for a large number of include files over a large number of different directories can create a performance bottleneck under certain types of load. To combat this, the Magento core team created the Magento Compiler extension, and started shipping Magento with this functionality around version 1.4 CE.

    What the compiler does is makes a copy of every class in a Magento system and places them in a single folder. The class’s full name is used for the filename to ensure uniqueness

    include/src/Mage_Core_Model_Abstract.php

    include/src/Foo_Module_FooController.php

    etc...

    This is done once. Then, when Magento is configured to use the compiler classes, its autoload will look in the compiler folder instead of running its normal autoload routine. This spares PHP the overhead of transversing the file system for all the different include paths.