Take the 2-minute tour ×
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

I have magento 1.7.3 and have some 3rd party extensions like Fortis theme, easy lightbox, ...

my question is :

if compiler mode had issues, is it recoverable?

share|improve this question
    
I also don't know if it's recoverable, but I with Fabian. I've found the compiler to be more trouble than it's worth. –  jpeters May 3 at 22:42
    
Somewhere around 1.6 and up, code optimization has rendered the compiler obsolete. –  Fiasco Labs May 4 at 20:38
    
That's not the case. As mentioned, compiler helps in I/O constrained environments, working with any OpCode cache before its initial content prime (or if stat is disabled). Using compiler is A GOOD THING. –  sonassi May 5 at 10:13
    
Compiler is NOT a good thing. Use APC, use stat=0 and save the headaches. Its just another layer of complexity. –  B00MER May 8 at 23:10
1  
As a hosting provider it may help on edge cases, but as a dev I hate it. Fabrizio Branca class map would be a better alternative.fabrizio-branca.de/magento-class-path-cache.html –  B00MER May 9 at 10:15
show 2 more comments

3 Answers 3

Compiler is very stable and only really encounters problems with edge cases where there is a relative class include hardcoded (rather than reliant on the Magento autoloader). These are few and far between though.

There are several advantages to compiler, the main reason being its benefits in an IO constrained environment. Your mileage will vary as to what gains it might actually being in the real world for your store. Some will refer to its benefits being inconsequential - which is sometimes the case when using an OpCode cache, but only if you have disabled file stat - which in my opinion isn't wise (as it will require purging of the entire OpCode cache just to reflect the change in a single file).

The benefits are strictly related to both the pace at which the Magento bootstrap can be loaded (in terms of raw time it takes to complete all file inclusions), it has nothing to do with database operations.

A key benefit is that it overrides the normal PHP autoloading class precedence, so instead of three heirarchies of directories being checked (local, community and core) for the existence of a class, it need only load from a single location. It effectively cuts out 3x the stat system calls that would otherwise have taken place (along with a number of other system calls). So it reduces IO and reduces wasted CPU time.

On a production store, you need not worry about the debug difficulty implications it may add, as you can do your debugging in a dev environment.

Turning off compiler should the worst happen is as simple as deleting the compiler config php file (declared at the to of index.php).

My only suggestion would be to ensure you have tested your store after enabling it just to ensure there are no major errors.

As with any change in the pursuit of performance, first understand your problem before trying to address it with any changes. Compiler won't make a badly built store any faster, but it will shave milliseconds off fast store.

  • Yes you can use it.
  • Yes you should use it.
  • Yes you can easily disable it.
share|improve this answer
add comment

Edit: Yoav Kutner (Magento CTO) let me know that “in later versions since we optimized the catalog EAV, Magento Compilation is not really needed if you have byte code caching and if it is configured correctly“.

Source: http://www.gxjansen.com/101-ways-to-speed-up-your-magento-e-commerce-website/


Simply enabling Compilation you won't notice much if any difference other than adding complexity. The sheer amount of 3rd party modules that fail to support this properly means its not worth the time and you're better of in a production environment setting apc_stat=1 using something like this simple module to clear APC's cache: https://github.com/buric/Inchoo_Apc from the admin would be a better alternative than using the compiler.

In short use APC, don't over Complicate things with the Compiler. If you've exhausted all efforts on performance and are unable to add more hardware would be the only time I would even consider it.

apc.stat details

;Setting this to 0 will give you the best performance, as APC will
;not have to check the IO for changes. However, you must clear 
;the APC cache to recompile already cached files. If you are still
;developing, updating your site daily in set this to 1

enter image description here

share|improve this answer
add comment

I can't answer the question, but I think I can answer another one:

Should I use the compiler

HELL NO. There is not advantage of the compiler, only a lot of problems. No speed performance and debugging is hell

If you want more performance, update PHP to 5.5

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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