0

I need to understand what is actually process done by compilation ? how can it help to speed up magento site. Why we are not able to install extension when compilation is in enable mode.

Also need to understand about cache what is process the actually done by catch and how can it improve speed of site loading time.

2
  • sorry but i dont have any idea about that question. thanks for information :)
    – Yogesh
    Jun 9, 2014 at 13:11
  • @TBI infotech,@Tim,@Marius Some times if you not able to understand question you don't have time than Please dont make it duplicate because i hope some one can answer.
    – Yogesh
    Jun 10, 2014 at 5:26

1 Answer 1

1

The compilation in Magento is different than classic code compilation like in C or Java. The compilation process doesn't reduce the file size, neither does it transform the PHP code into a machine code, it just creates hard copy of all classes from all magento modules (core and custom) into a single folder so that the autoloader can load them faster (instead of traversing a big number of folders and subfolders to reach to it). The copies are stored inside the includes folder.

If you have activated the compiler, magento will search for the classes only in the includes folder. And if you install a new module whyle the compiler is activated, it won't automatically create a copy of the new classes inside the include folder, so it won't find the module classes. That's why you need to recompile everytime you change or add any class in any magento module.

You can find more details about the compiler on Alan Storm's blog http://alanstorm.com/magento_compiler_path

For caching, you can read this related question and answers https://stackoverflow.com/questions/9283279/explain-magento-caching-system

Not the answer you're looking for? Browse other questions tagged or ask your own question.