DARKF3D3 Posted January 4, 2011 Share Posted January 4, 2011 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.orgDo you know i can i do that changes?ThanksBye Link to comment Share on other sites More sharing options...
rocky Posted January 5, 2011 Share Posted January 5, 2011 This is something that has been greatly improved in PrestaShop v1.4. It adds the following to the .htaccess file: 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" FileETag INode MTime Size AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript 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. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 6, 2011 Author Share Posted January 6, 2011 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 Link to comment Share on other sites More sharing options...
sors Posted January 6, 2011 Share Posted January 6, 2011 Use jquery from google CDN, upload images to another domain Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 6, 2011 Author Share Posted January 6, 2011 Could you give me omore information about jqery of google CND, i don't know that. Link to comment Share on other sites More sharing options...
rocky Posted January 7, 2011 Share Posted January 7, 2011 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.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js. Link to comment Share on other sites More sharing options...
otzy Posted January 7, 2011 Share Posted January 7, 2011 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. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 10, 2011 Author Share Posted January 10, 2011 Cache_lite is a module? Link to comment Share on other sites More sharing options...
otzy Posted January 10, 2011 Share Posted January 10, 2011 Cache_Lite is php extensionhttp://pear.php.net/package/Cache_Lite/ Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 10, 2011 Author Share Posted January 10, 2011 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. Link to comment Share on other sites More sharing options...
otzy Posted January 10, 2011 Share Posted January 10, 2011 You should modify php files. But first of all you should determine the cause of bad perfomance. Then you could select the right solution. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 10, 2011 Author Share Posted January 10, 2011 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 Link to comment Share on other sites More sharing options...
otzy Posted January 10, 2011 Share Posted January 10, 2011 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 mySQLIt 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. Link to comment Share on other sites More sharing options...
sors Posted January 11, 2011 Share Posted January 11, 2011 Smarty caching can be used instead Cache_Litehttp://www.prestashop.com/forums/viewreply/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.com/p/web-optimizator/ Link to comment Share on other sites More sharing options...
DARKF3D3 Posted January 15, 2011 Author Share Posted January 15, 2011 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... Link to comment Share on other sites More sharing options...
sors Posted January 16, 2011 Share Posted January 16, 2011 This site use web-optimizator.Unpack web-optimizator from http://code.google.com/p/web-optimizator/ to your website rootAdd 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/ directoryOpen http://your-website/web-optimizer/index.php and install changes to index.php and .htaccessIn 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. Link to comment Share on other sites More sharing options...
DARKF3D3 Posted February 2, 2011 Author Share Posted February 2, 2011 Add write permissions to /web-optimizer/ directoryOpen http://your-website/web-optimizer/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? Link to comment Share on other sites More sharing options...
Paul C Posted February 7, 2011 Share Posted February 7, 2011 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 Link to comment Share on other sites More sharing options...
Paul C Posted February 11, 2011 Share Posted February 11, 2011 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 domainsThe 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 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 Link to comment Share on other sites More sharing options...
sors Posted February 12, 2011 Share Posted February 12, 2011 For css and js files your may use static compression http://www.prestashop.com/forums/viewthread/91306/development/static_compression_for_cccFor automated css sprites creation see this code http://web-optimizator.googlecode.com/svn/trunk/libs/php/css.sprites.optimize.phpHTML 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'); prefilter.tws.php.zip Link to comment Share on other sites More sharing options...
Rhobur Posted February 15, 2011 Share Posted February 15, 2011 Sorry, wasn't paying attention, now I see that for the 1.3 branch I should use the prefilter.Thank you ! Link to comment Share on other sites More sharing options...
sors Posted February 24, 2011 Share Posted February 24, 2011 For using html and inline js compression as prefilter in version 1.4 in config/smarty.config.inc.php replace if (Configuration::get('PS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('output', 'smartyMinifyHTML'); if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('output', 'smartyPackJSinHTML'); with if (Configuration::get('PS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('pre', 'smartyMinifyHTML'); if (Configuration::get('PS_JS_HTML_THEME_COMPRESSION')) $smarty->registerFilter('pre', 'smartyPackJSinHTML'); In tools/js_minify/jsmin.php replace if (ord($this->a) <= self::ORD_LF) { throw new JSMinException('Unterminated string literal.'); } with if (ord($this->a) <= self::ORD_LF) { break; } and after case ' ': if ($this->isAlphaNum($this->a)) { $this->action(1); break; } delete $this->action(3); break; Link to comment Share on other sites More sharing options...
Yun Posted February 26, 2011 Share Posted February 26, 2011 This is something that has been greatly improved in PrestaShop v1.4. It adds the following to the .htaccess file: 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" FileETag INode MTime Size AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript 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. This was very useful for me and I managed to speed up my download times noticeably. However, I have another problem which is probably very simple, but I can't seem to find the remedy for.Now that my text & images are cached, I can't edit them and can't find a way to clear the cache so that changes show up.Any pointers?Thanks again for sharing the above.Iain Link to comment Share on other sites More sharing options...
Yun Posted February 28, 2011 Share Posted February 28, 2011 This free module enables you to clear the smarty cache on-demand:http://www.prestashop.com/forums/viewthread/45020/third_party_modules/module_clear_smarty__21211__ps_1_dot_4_compatible Thanks for taking the time to answer - appreciate it. I will give the module a go and see how I get on.Iain Link to comment Share on other sites More sharing options...
DATO Posted March 3, 2011 Share Posted March 3, 2011 For css and js files your may use static compression http://www.prestashop.com/forums/viewthread/91306/development/static_compression_for_cccFor automated css sprites creation see this code http://web-optimizator.googlecode.com/svn/trunk/libs/php/css.sprites.optimize.phpHTML 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'); thank you for share this plugin for 1.3 it's for jsminify.is there any plugin for css and php minify ? Link to comment Share on other sites More sharing options...
sors Posted March 4, 2011 Share Posted March 4, 2011 For js and css compressing in 1.3 I use YUI Compressor and Google Closure Compiler. prefilter.tws.php for html and inline js compressing. Link to comment Share on other sites More sharing options...
sors Posted March 5, 2011 Share Posted March 5, 2011 It decrease html page size and inline js on this page. Not for separate scripts in js files. Link to comment Share on other sites More sharing options...
SpyrosT Posted June 25, 2011 Share Posted June 25, 2011 This site use web-optimizator.Unpack web-optimizator from http://code.google.com/p/web-optimizator/ to your website rootAdd 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/ directoryOpen http://your-website/web-optimizer/index.php and install changes to index.php and .htaccessIn 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. Hey sors I have a quich question for you.Is it really a must to add these two codes in the header.php and footer.php ?I am asking because the software installs these codes in the start and endof the index.php file.Tnx Link to comment Share on other sites More sharing options...
kim007 Posted August 13, 2012 Share Posted August 13, 2012 This is something that has been greatly improved in PrestaShop v1.4. It adds the following to the .htaccess file: 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" FileETag INode MTime Size AddOutputFilterByType DEFLATE text/html AddOutputFilterByType DEFLATE text/css AddOutputFilterByType DEFLATE text/javascript AddOutputFilterByType DEFLATE application/javascript AddOutputFilterByType DEFLATE application/x-javascript 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. Hey Rocky Can u tell me how to do it in Prestashop 1.3.1.1 Plus If i create .htaccess so I can create more items field and upload picture.. its doesnt affected...coz sometime its show blank pages Link to comment Share on other sites More sharing options...
bellini13 Posted August 13, 2012 Share Posted August 13, 2012 there should be an.htaccess file located in the root of your store. just add those lines to the end of the .htaccess file. 1 Link to comment Share on other sites More sharing options...
kim007 Posted August 18, 2012 Share Posted August 18, 2012 there should be an.htaccess file located in the root of your store. just add those lines to the end of the .htaccess file. Hey thnx for reply I tried this but there is error even I talked with my Host provide to On ExpiresActive On He said it is On but still I have error " Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. " Link to comment Share on other sites More sharing options...
bellini13 Posted August 19, 2012 Share Posted August 19, 2012 and did you review the server error log as the error message suggests? Link to comment Share on other sites More sharing options...
kim007 Posted August 19, 2012 Share Posted August 19, 2012 and did you review the server error log as the error message suggests? Thnx for reply I done But my client says to me its really slow even now I have only few pics and categories successfully but my speed is 76/100 on webpagetest but developer.google show That 58/100 even after this is show u didnt define image "The following cacheable resources have a short freshness lifetime. Specify an expiration at least one week in the future for the following resources: http://www.idisplay.se/.../iphone-4s-green-color-conversion-kit-... (expiration not specified) http://www.idisplay.se/.../iphone-4-green-color-conversion-kit-l... (expiration not specified) so many images all from my category Images and other files just like http://www.idisplay.se/.../iutil.prestashop-modifications.js (expiration not specified) http://www.idisplay.se/js/jquery/jquery.autocomplete.js (expiration not specified) http://www.idisplay.se/js/tools.js (expiration not specified) http://www.idisplay.se/modules/blockcart/ajax-cart.js (expiration not specified) http://www.idisplay.se/modules/slideric/img/nivo_nav.png (expiration not specified) http://www.idisplay.se/.../jquery.nivo.slider.pack.js (expiration not specified) http://www.idisplay.se/themes/theme001/img/bullet.gif (expiration not specified) http://www.idisplay.se/.../button-medium-exclusive.gif (expiration not specified) http://www.idisplay.se/.../center_column_titleBg.png (expiration not specified) what does mean ...? kindly reply me www.idisplay.se Link to comment Share on other sites More sharing options...
bellini13 Posted August 19, 2012 Share Posted August 19, 2012 your TTFB (time to first byte) is very long (3-4 seconds). you also have 5 images that took more than 2 seconds each to download. URL: http://www.idisplay.se/modules/slideric/en0.jpg URL: http://www.idisplay.se/modules/slideric/en1.jpg URL: http://www.idisplay.se/modules/slideric/en2.jpg URL: http://www.idisplay.se/modules/slideric/en3.jpg URL: http://www.idisplay.se/img/favicon.ico Link to comment Share on other sites More sharing options...
Bicho Mato Posted September 28, 2012 Share Posted September 28, 2012 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'); In what line i have to put that code $smarty->load_filter('pre','tws'); please? Link to comment Share on other sites More sharing options...
CartExpert.net Posted September 28, 2012 Share Posted September 28, 2012 In what line i have to put that code $smarty->load_filter('pre','tws'); please? After $smarty = new Smarty(); Regards. Robin. The CartExpert Team Link to comment Share on other sites More sharing options...
chetwyn Posted October 1, 2012 Share Posted October 1, 2012 Great stuff. Need help thou. I'm running 1.4.7 and want to use it all. I have all the out of the box compression on. where do I put: http://web-optimizator.googlecode.com/svn/trunk/libs/php/css.sprites.optimize.php and where do I put prefilter.tws.php.zip ? Should I also follow this http://www.prestashop.com/forums/topic/91306-static-compression-for-ccc/ and http://www.prestashop.com/forums/topic/91306-static-compression-for-ccc/ or did 1.4.7 have it sorted? Link to comment Share on other sites More sharing options...
perusi Posted February 26, 2013 Share Posted February 26, 2013 anything for prestashop 1.5.3 ?? Link to comment Share on other sites More sharing options...
vietnam Posted March 20, 2013 Share Posted March 20, 2013 anything for prestashop 1.5.3 ?? I also subscribe. 4000 products, and 230 categories and the website is like not moving at all. Link to comment Share on other sites More sharing options...
BoKr Posted November 29, 2013 Share Posted November 29, 2013 I searched the forum for YUI Compressor, Closure Tools, Minify, yuglify and came over this thread. It is one of the rare in this forum dealing with these keywords. Since it of utter importance having a speedy shop I assume all these tools are of not interest when dealing with Prestashop or Prestashop does better when all CCC are on. Anyway our shop runs as a shared webhost on a Hetzner server and I had to reckon that it runs measureably (common tools) and subjectively more snappy and faster with all CCC off and Apache optimizations off. However, I still wonder if our shop could benefit from compressed CSS and js via the named tools. Any expert here to give hints`? thanks alot Link to comment Share on other sites More sharing options...
inweb Posted March 10, 2015 Share Posted March 10, 2015 Who still run PrestaShop 1.3 there is a tutorial how to use PrestaShop 1.5 HTML minification: http://www.inveostore.com/blog/prestashop-minifying-html/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now