Jump to content

[solved] Performance problem w/force compile


Recommended Posts

I've been suffering very slow performance from my shop since I upgraded to 1.5 from 1.1, taking up to about 7 or seconds for a page to load (in 1.5 compared to a fraction of that before).

 

I have found that performance is double as fast by setting the cache to "Recompile templates if the files have been updated", with the page loading as fast as 1 or 2 seconds. If I set to "force compilation" then it just grinds to a halt again. Does this indicate some kind of problem as I'm a bit confused why performance is better on what I understood to be the wrong setting?

Link to comment
Share on other sites

you would only run always recompile, well never :)

 

I am not sure why they even kept that option given we can set only compile if newer template available. this is a nice feature for developers...

 

you should set to only compile if new file if you are changing .tpl files.

 

if you are not updating .tpl files set to never compile for best results

Link to comment
Share on other sites

:) Thanks! I had been frustrated by the slow performance by use of force compile. I had only used this as the help file on the page says that "force compile" is normal behaviour so I assumed that meant it was the one I should use...

 

This is what the prestashop help file says and I suspect is wrong based on what you've said and my experience!

 

  • Never compile cache. Only enable this if you are making edits theme, and need to see your changes every time you reload your page.
  • Compile cache if templates are updated. PrestaShop is able to see when a theme file has changed, but this might not always work as expected.
  • Force Compile. The normal behavior: HTML pages are compiled and cached, even if the theme has changed.

Link to comment
Share on other sites

the one caveat is that more and more modules embed smarty templates into their modules. A good example of this is Paypal. This means that if you upgrade Paypal, and leave the setting to "Never Compile", this will lead to unexpected behavior, as any changes to the template files will not get recompiled.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...