Jump to content

PrestaShop v1.4 Performance Settings


Recommended Posts

Hi All,

I just created a video tutorial on PrestaShop v1.4 (1.4.0.17 to be exact) Performance settings. The video covers the following topics:

1. Smarty
• Force Compile
• Cache

2. CCC (Combine, Compress, and Cache)
• Smart cache for CSS
• Smart cache for JavaScript
• Minify HTML
• Compress inline JavaScript in HTML
• High risk HTML compression

3. Media Servers

4. Ciphering
• Rijndael with mcrypt lib
• BlowFish class

You can check this 3-part tutorial at http://www.prestatraining.com/performance-settings-for-prestashop-version-1-4/. Let me know what you think.

Link to comment
Share on other sites

Awesome response Angora,

I'm going to see how this thread progresses and then make an updated tutorial, in the future, based on the feedback. Thanks for catching my mistake regarding how Smarty cache works in your first post. I'll fix that when I do the next revision.

Link to comment
Share on other sites

  • 1 month later...

Hi Curt,
I wonder if you can help me. To increase performance, I know I've been told I can change "false" to "true" in the following:

$smarty->caching = false;

I found that this really slowed things down and the last time I tried it my website wouldn't come up at all. I'm wondering if I was supposed to do something else
thank you
Phyllis

Link to comment
Share on other sites

Hi Phyllis,

Did you watch the tutorial video at http://www.prestatraining.com/performance-settings-for-prestashop-version-1-4/? If you haven't, it would be worth watching.

I'm assuming you are not in the process of modifying modules or templates. If that is true, I would suggest that you have the following settings:

For the Smarty Compile section:
Force Compile = No
Cache = Yes

For the CCC (Combine, Compress, and Cache) section:
Set Smart cache for CSS = Use CCC for CSS
Set Smart cache for JavaScript = Use CCC for JavaScript
Set Minify HTML = Minify HTML after "smarty compile" execution
Set Compress inline JavaScript in HTML = Compress inline JavaScript in HTML after "smarty compile" execution
Set High risk HTML compression = Keep W3C validation

Ignore the Media Server Section

For the Ciphering section:
Set Algorithm = Use Rijndael with mcrypt lib

For the Caching section (very last section on the Performance page)
Set Caching = No
Ignore all other settings

You should also be sure that you've generated your .htaccess file and selected the "Optimization" check box when you generated the file. This will enable GZIP compression and browser caching. You can see a demonstration of that at http://www.prestatraining.com/gzip-compression-browser-caching/

If you make, or confirm, these settings and you still have trouble, post again to this thread and maybe we can figure out what the problem is.

Link to comment
Share on other sites

Curt and Angora

Thank you for your time explaining this setting in Prestashop. I now have a much better understanding of each section of the setting. Angora, very nice explanation of the technical aspect of each setting relative to most people using Prestashop and I believe you are correct that 98% are on the shared server, and oh I love the sense of humor you added to your explanation that is a novel.

Lastly, Curt thank you for all of your tutorials, and just found them today and I saw one for the Tax training video which I was having problem with where I need to set the State Tax for the State of California, by the way I am using the version 1.4.1 and found a correction to the Product.php class code in French Forum. Bottom line is your explanation about setting taxes in Prestashop is very clear.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

Hello Curt and Angora,

Thanks a lot for the detailed posting on this topic.

My shop is running on v1.4.3 and is eagerly awaiting its debut within couple of weeks.

I have followed all of your instructions above, but the page is still unbearably slow. I've attached the Firefox add-on "Firebug" and "YSlow" analysis result screenshot (sorry for masking my domain on the screenshot), and it shows that this "DOC" component is taking almost 4-5 seconds to load. Would you have any insight into what this "DOC" component is, and why it's loading so slowly?

Upon my complaint, my hosting company moved my shop to a less crowded server, but the result did not improve at all!

I've bought about $400 worth of Prestashop modules already (I have about 1500 products uploaded), so it is too late for me to consider switching to another cart (I saw some posts indicating cs-cart, etc. perform better,, not sure if it's true).

Thanks for all your help.

Best regards,
Soo

48641_sX6vsRX4VWIBqii44NhB_t

Link to comment
Share on other sites

Hi Angora,

Thanks for your suggestion, first of all.

It seems like my response was not properly entered and it's gone now. Let me post again. =(

I have tried a fresh install of Prestashop v1.4.3 with the empty default DB, and the performance is much better. When I pointed this instance to my production DB with +1500 products, things slowed down again, with 5 seconds on every click on the Front Office. This seems definitely related to the way the store is pulling data from DB.

What's more convincing is the Back Office performance. Clicking on menu tabs like "Catalog", "Payment", "Modules" takes about 3 seconds to load, whereas tabs like "Customers", "Orders", "Shipping", "Employees", "Preferences", "Tools" take 0.1 - 0.3 seconds. I only have 4 customers, 4 test orders, and 5 employees.

So, it seems like any activity that would load meaningful amount of data from DB is really slow.

I've tried "Select" queries on mysql, and they were super-fast.

My rough guess is that the symptom may be related to the server settings of Apache/MySql/PHP for my hosting company and the way Prestashop interacts with their MySql. Other websites and shopping solutions running on the same hosting server (according to the hosting company) have no performance issue.

Would you have any suggestion as to how I can find the root cause and hopefully convince my hosting company that they need to do something on their side? Maybe it'd be worth resorting to a paid service to insert some debugging code in my shop to identify what's returning slowly...?

Thanks!
Soo

Link to comment
Share on other sites

Thanks very much for your detailed explanation. It feels like I'm following a thread of light in complete darkness. I'll definitely try out the profiler you suggested. It seems to have bit of learning curve.

In the mean time, I thought I'd give one last try before trying a different hosting company. There isn't any hosting company in my country (far east asia) who can reliably host Prestashop (some php functions blocked, etc.), so Prestashop developers helped make some code changes to get around the limitations. Going through it again with a different company is going to be a trouble for me, but I guess I'll have to do it if I exhaust all options..

I got the following Apache debug log from the hosting company.



[Wed Jul 6 13:39:42 2011] [debug] mod_rewrite.c(1644): [client XXX] mod_rewrite's internal redirect status: 0/10.
[Wed Jul 6 13:39:42 2011] [debug] mod_rewrite.c(1644): [client XXX] mod_rewrite's internal redirect status: 0/10.
.
.
.
access_log

XXX - - [06/Jul/2011:13:39:39 +0900] "GET / HTTP/1.1" 301 5
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /themes/prestashopic/cache/83136d3460856d0878a23e4817132288_all.css HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET / HTTP/1.1" 200 50823
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /themes/prestashopic/js/cufon-yui.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /themes/prestashopic/js/Trebuchet_MS_400.font.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/belvgstickerpro/js/js.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /themes/prestashopic/cache/e929d14f7c363d5322cc05acc6ee8f7a.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /img/logo.png?1309691203 HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/blocktopmenu/js/hoverIntent.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/blocktopmenu/js/superfish-modified.js HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/blocktopmenu/css/superfish-modified.css HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /themes/prestashopic/img/button-medium.png HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /2688-home/ipod-shuffle.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /6-20-home/macbook.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /22-71-home/philips-sonicare-flexcare-plus-hx6972-10-rechargeable-toothbrush.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /23-72-home/nutri-grain-kellogg-s-cereal-bars-variety-pack-48-13-oz.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /24-73-home/philips-sonicare-proresults-brush-heads-hx6013-hx6023.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /25-76-home/philips-norelco-7310xl-men-s-shaving-system.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /27-80-home/panasonic-er430k-vacuum-nose-facial-hair-trimmer.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /26-79-home/jeju-samdasoo-water-500ml-x-20ea-.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /29-84-home/kirkland-signature-100-pure-medium-amber-maple-syrup-32oz.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /31-87-home/pampers-baby-dry-diapers-economy-pack-plus-size-4-192-count-.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /32-90-home/nioxin-hair-cleanser-scalp-therapy-system-18.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/editorial/homepage_logo.jpg HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /modules/blocktopmenu/img/topbg.gif HTTP/1.1" 304 -
XXX - - [06/Jul/2011:13:39:42 +0900] "GET /30-100-home/pampers-sensitive-thick-care-wipes-refill-180-count-pouches-pack-of-4.jpg HTTP/1.1" 304 -


I'm particularly curious about the 3-seconds delay between the first line and the second line of the access log. Do you know what kind of heavy computation might be going on there that could give me a clue?

I've searched on the forum, and there seem to be a number of posts about sudden slowness in v1.4 and above. Some of them were resolved through setting the Force Compile set to false, but many of them still seem to remain unresolved and unanswered. Some users even seem to have downgraded to older version, which is not possible for me because the image paths structure was updated in 1.4.3...

Any idea or suggestion would be welcomed... Thanks!!!

Regards,
Soo
Link to comment
Share on other sites

I have experience setting up and configuring servers to run prestashop (speed, performance, software installs, htaccess directives, etc.). Also configuring prestashop to use all of the performance settings to maximize speed on the front end. Sometimes it's also necessary to look at all the third party modules a user is running because not all are created equal (could be heavy load on DB or scripting etc.). A lot more is possible with VPS or dedicated servers but a lot of improvements can still be made on shared hosting too. A lot of great services available free of charge I can shed some light on as well. Let me know if you need help speeding up your prestashop.

I do charge a fee but it's minimal and very reasonable. That is only of course if I do anything, consultation is free.

Link to comment
Share on other sites

  • 2 weeks later...

Hi folks,

Firstly thank you so much for the thread, it has proved to be really useful when used in sync with the videos on the prestatraining website.

I do however still have an issue. I had cachefs enabled and the file on my server has grown to 7 gig, which has nearly filled my server space left. I have tried to disable the FScache option via the performance tab but it just keeps loading without changing the setting. I have also tried to edit the settings.inc.php file manually but it keeps returning errors. I tried replacing "CacheFS" with "off" or "0" but it returns an error. Any ideas how I fix this mess please?

Thank you.

Link to comment
Share on other sites

I too was suffering with an ultra slow back office. Inspired by Angora's post suggesting to remove all occurance of language translation functions, I used a regex find and replace with dreamweaver to all of the files in the 'Tabs' folder (Something like 3000 replaces!) It has sped things up considerably which I'm happy about, just some front end optimisations now and I'll be happier.

In the search and replace box, change the Find in: value to Folder.. and locat the admin/tabs folder

There regex's I used are:

Find:

Regex Removed (wasn't displaying properley in this thread)



Replace

$1



This finds all language functions which are sitting in strings i.e.

'some text' . $this->l('word') . 'other text'



Then you will want to replace all occurances where the function is called outside of a string

Find:

(wasn't displaying properley in this thread)



Replace

'$1'



Oh and its worth backing up the whole 'tabs' folder first before you do the search and replace.

I'm tempted just to set this thing loose on the root directory and do it for all scripts! Any reasons why I shouldn't?

UPDATE:

Well I backed up all files and did this search and replace on ALL files from root. Using both search and replace variations - 7433 replaces in 3941 documents! WOH! Now for some testing, but so far so good

Link to comment
Share on other sites

  • 5 months later...
  • 2 weeks later...
  • 8 months later...

Where/how do I apply the requirement for "PHP extension "mcrypt" when enabling mcrypt under the performance tab? Is it php.ini ? If so, what needs to be placed there?

 

My site is taking over a minute to load on PS 1.4.9. i notice my .htaccess differs from the previous one and I am not sure if this is the problem (My Host says it is but cant tell me how to fix it). The bottom section reads:

 

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
FileETag INode MTime Size
<IfModule mod_deflate.c>
<IfModule mod_filter.c>
 AddOutputFilterByType DEFLATE text/html text/css text/plain text/javascript application/javascript application/x-javascript
</IfModule>
</IfModule>

 

 

Any help would be appreciated.

 

I am happy to pay someone to fix the slow page load as it is currently unacceptable and I need it fixed ASAP.

Link to comment
Share on other sites

  • 3 years later...

This message is result of frustration: i did all settings, research, i even get help from a friend who is working on prestashop modules. All cache, smarty, not rebuild cache EVER... I don't know what to do with prestashop... Very dissapointed! 

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...