Vote to Improve PrestaShop

PrestaShop Forum: Build a free online shop. Count on the Community!

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum: Build a free online shop. Count on the Community!

Jump to content

 
Photo

Increase site speed


  • Please log in to reply
39 replies to this topic
DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 04 January 2011 - 01:00 PM

Using this site i see that there are a lot of optimization that can i do to improve my e-commerce speed (look at the image below)
http://www.webpagetest.org


Do you know i can i do that changes?


Thanks
Bye

Attached Files

  • Attached File  002.jpg   184bytes   2016 downloads

Il negozio online di Idee Regalo

rocky

    PrestaShop Legend

  • US Moderators
  • 10064 posts

Posted 05 January 2011 - 04:41 AM

This is something that has been greatly improved in PrestaShop v1.4. It adds the following to the .htaccess file:

<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>    AddOutputFilterByType DEFLATE text/html    AddOutputFilterByType DEFLATE text/css    AddOutputFilterByType DEFLATE text/javascript    AddOutputFilterByType DEFLATE application/javascript    AddOutputFilterByType DEFLATE application/x-javascript</IfModule>


This enables compression and caching. It also has the option to combine, compress and cache CSS and Javascript. In PrestaShop v1.3, you must do that manually, which is very difficult.
Nethercott Constructions - PrestaShop modules and guides

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 06 January 2011 - 06:08 PM

Thanks, i have make the modify and it give me a better result.

Now i want to adjust the others... Use a CDN, Cookies, No ETags: in these 3 i have a low score, theres a way to fix them?


Thanks
Il negozio online di Idee Regalo

sors

    PrestaShop Addict

  • Moderators
  • 824 posts

Posted 06 January 2011 - 06:29 PM

Use jquery from google CDN, upload images to another domain

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 06 January 2011 - 07:26 PM

Could you give me omore information about jqery of google CND, i don't know that.
Il negozio online di Idee Regalo

rocky

    PrestaShop Legend

  • US Moderators
  • 10064 posts

Posted 07 January 2011 - 03:26 AM

From the PrestaShop v1.4 Performance Guide I'm working on:

A customer’s location can have an impact on response times. A content delivery network (CDN) is a collection of web servers distributed across multiple locations to deliver content more efficiently to users. When a customer’s browser requests a file, their browser will download it from the closest available server, which will be much faster than if it was downloaded only from the country where your website is hosted. It also saves bandwidth on your website, since the file is downloaded from the CDN instead of your website. Customers will also save bandwidth if the file is a common library like jQuery that has already been downloaded for another website, since the file will be read from the browser’s cache instead of re-downloaded.

Google has a CDN available with many common libraries. For example, the URL for jQuery v1.4.4 is https://ajax.googlea.../jquery.min.js.
Nethercott Constructions - PrestaShop modules and guides

otzy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 89 posts

Posted 07 January 2011 - 12:45 PM

I use Cache_Lite in Category.php, jbx menu (this one uses recursion and is rather slow even with two or tree levels)
and in block categories.
Caching increases performance dramatically.

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 10 January 2011 - 10:20 AM

Cache_lite is a module?
Il negozio online di Idee Regalo

otzy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 89 posts

Posted 10 January 2011 - 10:34 AM

Cache_Lite is php extension
http://pear.php.net/...age/Cache_Lite/

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 10 January 2011 - 10:37 AM

I don't undestand where i should put that to improve my site speed...
Sorry but I'm not very handy, i still have a lot of things to learn.
Il negozio online di Idee Regalo

otzy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 89 posts

Posted 10 January 2011 - 10:57 AM

You should modify php files. But first of all you should determine the cause of bad perfomance. Then you could select the right solution.

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 10 January 2011 - 11:01 AM

In the image below there is my actual evaluation on webpagetest, i see a lot of problem.

If you want to make a test this is the site:
www.crazyluke.it

Attached Files

  • Attached File  002.jpg   169bytes   1579 downloads

Il negozio online di Idee Regalo

otzy

    PrestaShop Apprentice

  • Members
  • PipPip
  • 89 posts

Posted 10 January 2011 - 12:01 PM

the parameters you see there are all secondary. Firstly you have to optimize server performance - php scripts and database requests.

I look at your site - all static elements are loaded without delay. And they are cached by browser so you should not keep in mind compressing and minifiing.
But category and product pages take from 1.4s to load. I had the same issue on my site.
The problem is how Prestashop handles the database and generates output html.
It makes a lot of duplicate requests and some hard requests to the database. Smarty is rather hard too.

This is a common problem for the sites having rich dynamic content.

If products list in categories and information on product pages are slow changing (for instance once a day or two times a day) you may cache it on the hard disk of your server (with Cache_Lite) or on another server (with memcache). If your visitor makes request to the cached data your server gets it from cache and does not deal with php and mySQL
It is most likely that Cache_Lite is enabled on your host. Ask your hosting provider.

To use it you need to modify some php files. I have seen that some modules in Prestashop have elements of caching but they are not working properly.

If you need help write me.

sors

    PrestaShop Addict

  • Moderators
  • 824 posts

Posted 11 January 2011 - 12:20 PM

Smarty caching can be used instead Cache_Lite
http://www.prestasho...ewreply/311861/
This method used in 1.4 version:
Tools::enableCache();if (!$this->isCached('blockcategories.tpl', $smartyCacheId)){...}$display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId);Tools::restoreCacheSettings();return $display;


Cache size for 1 category = category page size * laguage count * sorts methods count * sort direction count (2)

For increase client side speed merge and compress js and css files with YUI Compressor, use css sprites for background images. Compress output html code with smarty postfilter (but I use smarty compilled templates compression).

For automatic site accelerate you may use http://code.google.c...eb-optimizator/

DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 15 January 2011 - 02:06 PM

I see that these modify to increase site speed will be implemented in prestashop 1.4 so i think that i'll wait for the new version that should arrive soon...
Il negozio online di Idee Regalo

sors

    PrestaShop Addict

  • Moderators
  • 824 posts

Posted 16 January 2011 - 09:11 AM

This site use web-optimizator.

Unpack web-optimizator from http://code.google.c...eb-optimizator/ to your website root
Add to begining of header.php
require('/your-website-root/web-optimizer/web.optimizer.php');

Add to end of footer.php
$web_optimizer->finish();

Add write permissions to /web-optimizer/ directory
Open http://your-website/...mizer/index.php and install changes to index.php and .htaccess

In addition to 1.4 functions this script add CSS Sprites, data:URI and Coral CDN using. Maybe developers are using some ideas from this script to increase prestashop perfomance.

Attached Files



DARKF3D3

    PrestaShop Addict

  • Members
  • PipPipPip
  • 646 posts

Posted 02 February 2011 - 09:54 AM

Add write permissions to /web-optimizer/ directory
Open http://your-website/...mizer/index.php and install changes to index.php and .htaccess



I have problem with this part... which additional modify i must do on the index.php and .htaccess file?
Il negozio online di Idee Regalo

Paul C

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1093 posts

Posted 07 February 2011 - 02:09 AM

A word of caution: sometimes, especially with shared hosting, you can slow down your site by enabling certain technologies intended to speed your site up. Using compression on pages can be one of them as this is CPU intensive and when used on a busy server can result in the time spent compressing being longer than the reduction in time to transfer the now smaller files.

Optimisations like these are actually very hard to analyze properly unless you have the equipment isolated in a test environment and are able to accurately measure the improvements made. A score of 70+ out of 100 wouldn't seem all that bad to me anyway.

I would urge you to track the performance of your site over time, just to make sure that you aren;t slowing down your site in pursuit of a "perfect" performance score!

Paul
Free Prestashop modules and developer resources
Latest Prestashop Developer articles: 1.4 Plugins Revisited – Part 1, 1.4 Plugins Revisited – Part 2
Latest News: Prestashop Module and Theme Developers can now Advertise on eCartService.net

Paul C

    PrestaShop Fanatic

  • Members
  • PipPipPipPip
  • 1093 posts

Posted 12 February 2011 - 12:47 AM

I'm working with 1.4 via the SVN right now and I have to say that once I'd migrated the theme to 1.4 I then as a test:

- enabled smarty 3,
- turned on the smarty optimisations
- enabled the first 4 CCC optimisations
- set up 3 cdn domains

The increase in performance was noticeably significant though -- but in the front office only. The Back Office is less important, but it would be nice if the back office was a little quicker in places, but it's lower priority :)

The problem with some of these performance tools like Yahoo's YSlow and Google's Page speed is that they in some cases give conflicting advice, because there really is no one single ideal solution for every site. As an example YSlow will recommend a CDN, but Google Page Speed will see the extra DNS lookups and recommend you minimise them.....

You have to be careful you don't end up optimising an arbitrary score (as calculated by a performance tool) and as a result DE-optimise your site :D

There are parallels with running "SEO analysis" tools on pages and making silly changes to please a bit of software; for no real gain.

Paul
Free Prestashop modules and developer resources
Latest Prestashop Developer articles: 1.4 Plugins Revisited – Part 1, 1.4 Plugins Revisited – Part 2
Latest News: Prestashop Module and Theme Developers can now Advertise on eCartService.net

sors

    PrestaShop Addict

  • Moderators
  • 824 posts

Posted 12 February 2011 - 05:19 AM

For css and js files your may use static compression http://www.prestasho...ression_for_ccc

For automated css sprites creation see this code http://web-optimizat...es.optimize.php

HTML minification option increase page generation speed. Your may use this option as smarty prefilter for minificate template before compiling in php code.

For prestashop 1.3 unzip prefilter.tws.php to tools/smarty/plugins and add to config/smarty.config.inc.php
$smarty->load_filter('pre','tws');

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users