So what is the Magento compilation process? The short description would be, “An easy way to improve Magento performance.” That is true. But what does it do exactly?
Whenever Magento tries to load a class, it goes through the autoload process. This basically means it splits up the class name, creates and sets an include path, and locates the class from there. That’s all good and fine, but when it does this quite a few times per page load, it gets a little cumbersome to go through the entire directory structure.
In order to combat this performance bottleneck, Magento uses a compiler process. What it does, is essentially takes all the classes, and places them in a single location instead of running through the entire process of loading a single class. It makes loading times much more quick.
Whenever you turn on compilations, it places all files inside your
/includes/src/ folder. It also renames all files to the full class name to make sure it is unique and no duplicates are accidentally loaded.
Whenever you install a new module, you need to rerun the compilation process in order to include the new module’s files in the compilation. You can do this one of two ways:
First, through the admin panel. Go to System->Tools->Compilation.
Then, click on the “Run Compilation Process” button.
Second is through the shell, but that’s a lesson for another time 😉